Hi,
Ive had a look on the Microsoft website, but havent really gotten anywhere with this..... so back to the best place to get a question answered - XtremeVB!
Im looking at the best way to do a Merge with Word, from a Dataset in .NET to a .dot template. The .dot template can contain a table which will have multiple lines (e.g. if it is Orders, the table will have one line with the fields in it, but will grow depending on the number of Order lines).
At the moment Im converting the Dataset to XML (using WriteXML), and using a component which opens up Word as a object, then replaces each field one-by-one. The thing is its very slow, programmatically replacing all the fields in a large document can take some time......
There must be a better, faster way to do this? Im thinking there is a function in Word Automation to give it an XML file to merge itself, which would mean Word doing the work and not the communication between .NET and Word line by line.
Any suggestions?
Ive had a look on the Microsoft website, but havent really gotten anywhere with this..... so back to the best place to get a question answered - XtremeVB!
Im looking at the best way to do a Merge with Word, from a Dataset in .NET to a .dot template. The .dot template can contain a table which will have multiple lines (e.g. if it is Orders, the table will have one line with the fields in it, but will grow depending on the number of Order lines).
At the moment Im converting the Dataset to XML (using WriteXML), and using a component which opens up Word as a object, then replaces each field one-by-one. The thing is its very slow, programmatically replacing all the fields in a large document can take some time......
There must be a better, faster way to do this? Im thinking there is a function in Word Automation to give it an XML file to merge itself, which would mean Word doing the work and not the communication between .NET and Word line by line.
Any suggestions?