D
Derek Hart
I have a vb.net winforms application that loops through several thousand
word documents and prints them, with the filenames being read from a SQL
database. I am using late bound code to load MS Word. I have tried loading
Word for each document, printing the doc, and exiting Word. I have also
tried loading Word for 100 documents at a time, exiting Word, and reloading
Word for the next 100 documents. I have tried many scenarios. Around
approximately 1500 documents Word seems to stop, and I will get an error
""exception has been thrown by the target of an invocation" - and Windows XP
itself is mostly frozen (cannot load any apps), until I exit my winforms
app. I am about to move to loading code inside an MS Word template directly
instead of trying to automate from dot net. I am not sure if somebody will
have direct advice on how to get this working in my winforms app, but it
would be helpful to know if it is suggested to not try to automate Word like
this from a vb.net app with such heavy printing in Word. Or should I use
VB6 to automate it. I have to use late bound because I may print in
different versions of Word. Any thoughts?
Derek Hart
word documents and prints them, with the filenames being read from a SQL
database. I am using late bound code to load MS Word. I have tried loading
Word for each document, printing the doc, and exiting Word. I have also
tried loading Word for 100 documents at a time, exiting Word, and reloading
Word for the next 100 documents. I have tried many scenarios. Around
approximately 1500 documents Word seems to stop, and I will get an error
""exception has been thrown by the target of an invocation" - and Windows XP
itself is mostly frozen (cannot load any apps), until I exit my winforms
app. I am about to move to loading code inside an MS Word template directly
instead of trying to automate from dot net. I am not sure if somebody will
have direct advice on how to get this working in my winforms app, but it
would be helpful to know if it is suggested to not try to automate Word like
this from a vb.net app with such heavy printing in Word. Or should I use
VB6 to automate it. I have to use late bound because I may print in
different versions of Word. Any thoughts?
Derek Hart