Why (and how) would the file be open before using:
Set WdDoc = AppWd.Documents.Open("C:/test.docm")
There's nothing in the code you posted to indicate that you ever tested whether Word was even running before trying to open the document...
Why (and how) would the file be open before using:
Set WdDoc = AppWd.Documents.Open("C:/test.docm")
There's nothing in the code you posted to indicate that you ever tested whether Word was even running before trying to open the document...
Cheers
Paul Edstein
[Fmr MS MVP - Word]