Finally got it working. The problem was, as you assumed, a dialogue not being visible. I tried to quit Word while there was still a document with pending changes. Word asked if it should save the changes, but the message was "behind" my application. I changed my code so that open documents are saved before I quit Word. Now it works as expected (maybe better: as I hoped for?).
FYI:
I had another problem while testing. I created a test dir on the server that held my app and a dir for the documents created. First I did not get the error when starting my app from that test dir. This was caused by insufficient rights. After adjusting the rights the error came up again. So watch out for your access rights to the directories you hope to save your docs to.
Gerhard
>If you're trying to automate Word, well, good luck... it works until it breaks. It's possible that they are one version (of Word) ahead of you on that machine, or that the instance of it is running at a slightly more paranoid settings. Any of these may suffice to break your code.
>
>Is Word visible? The flickering icon leads me to suspect that it should be, or that it's trying to display a dialog, probably somewhere under your app. Try to alt-tab to it to see what's up. You may have turned the dialogs off, but new dialogs aren't necessarily of the same class or members of the same collection or be written by the same team, so they may just ignore the setting and still show up. Often it's an imminent catastrophe warning of the "you may be trying to print outside the printable area of the current printer" kind. You can't know until you make that dialog visible.
>
>Of course, I may be completely wrong and it's really something different this time. I'll keep an eye on this thread.
Gerhard Schmidbauer
URANUS Software GmbH