joker77 Posted September 16, 2005 Posted September 16, 2005 Hi, I've had a look on the Microsoft website, but haven't really gotten anywhere with this..... so back to the best place to get a question answered - XtremeVB! I'm 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 I'm 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 it's 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? I'm 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? Quote What if the Hokey-Pokey IS what it's all about?
pendragon Posted September 30, 2005 Posted September 30, 2005 Don't know if you have looked at this but it may help http://support.microsoft.com/kb/301659/ The link is to a c# example, there is a link on it if you want VB Quote
Recommended Posts