I have a client where we're using Word mail merges to print MSDS documents. I've done mail merging before with good success, but this one is a little different and it has been nightmarish. First, this is not a "true" mail merge in that it is one document to one recipient, then another document to another recipient instead of one document to many recipient. The reason for this is that there are 385 documents and they need to be printed by customer.
Since a customer will only get one copy of a document, the loop is: Load XLS data source with one record for that customer/document combination, determine document to print, fire off mail merge, start over.
We get a lot of errors, unfortunately. One is that Word has encountered locked fields. All the fields were inserted by a macro I wrote and I did not lock any of them. Another is "OLE IDispatch exception code 0 from Microsoft Word: Cannot activate the application". Another factor may be the EPS graphic they use in the document. I haven't seen this in action, but sometimes when I open a document Word hangs up when it's trying to open (convert?) the EPS graphic. This all runs under Terminal Services and I wonder if that is a factor. Furthermore, in running the macros to get the mail merge fields in place, I've noticed that it can process a document in about 2 - 3 seconds, but sometimes a document will take 15 to 20 seconds to handle the same exact task. I have alreay put in a wait state so that I can try to head off timing issues, but if a doc takes 15 or more seconds to process, that wait state may not be enough. Overall, this implementation is not working well. They like the other stuff I've done for them, but this one is a sore spot.
Any ideas would be appreciated. Maybe you know a really good web site for this topic. I've got some things I'd like to try, but there may be some solutions I haven't thought about.