Quote:
Originally Posted by tariqaleed2
The best way I found , is forcing the user to closing ALL WORD Documents before making action .
If there is another way, TO NOT be THE user forcing the closing ALL WORD Documents TO BE better else the problem was solved .
|
You need to learn how to automate Word correctly, so that you can create a new Word session or, perhaps, automate an existing Word session. If you do the former, you don't have to worry about whether Word is already running or whether the user has any documents open. If you do the latter, you need to ensure your code is properly written so that existing documents don't need to be closed.
For an example of the former, see:
https://www.msofficeforums.com/word-...variables.html
For an example of the latter, see:
https://www.msofficeforums.com/word-...e-ms-word.html