c# - Microsoft Word 2007 VSTO, Create table outside word? -
i using vsto fill data table in microsoft word 2007 template. amount of data varies , filling many pages (+50) takes lot of time.
the code use create table:
word.table table = doc.tables.add(tableposition, numberofrows, 8, ref system.reflection.missing.value, ref system.reflection.missing.value);
i suspect time consumption due communication between visual studio (c#) , word each time insert data cell. if case, might faster create table in c# , afterwards insert word.
the microsot.office.interop.word.table abstract class - cannot this
word.table table = new word.table();
which have been handy.
are there other possibilities when using vsto?
- try creating table in html clipboard format, add clipboard, paste.
- try creating table in html , inserting it.
- try creating tab-delimited string newline character each record. insert string selection, convert selection table using tabs delimiter.
- create template xml, transforming data xslt word xml document.
- create template "directory mail merge", perform mail merge data.
depending on requirements, recommend using mail merge technique because user can edit template , mail merges fast, if have 50+ pages.
Comments
Post a Comment