I have a VB application that is looping through 1000 MS Word documents and is stripping out the properties of each of them to create a searchable database.
I managed to resolve the "freezing" problem by placing a little Sleep statement between each iteration (I think Word may have still been unloading one document while trying to load the next and got confused).
The problem I have now is that for some reason Word is REFUSING to listen to my command :-(
After I have finished with a document (and it is only on *some* documents this happens) I issue the following command :
wdDoNotSaveChanges is enumerated to 0 so I have tried it simply with 0 as well.Code:oWord.application.documents.Close wdDoNotSaveChanges
The problem is that the command is telling word to close down ALL open documents and regardless of any modifications made to them, don't bother saving any changes.
What actually happens however is that MS Word in its infinate wisdom decides to open a "SaveAs" dialog box.
Exsqueeze me!?!?
Despite what I try... it refuses to close down the document without saving as, even though I tell it I dont want to save any changes done.
Thoughts, directions, chuckles and finger pointing towards the yellow brick road would be appreciated.
