so i got some code in a workbook that opens a word document to use it as template to produce a mail body out of it.
This code works fine except in case that the required word document is already opened by the user. in this case i get command failed on the last line![]()
Please Login or Register to view this content.
i tried adding error handling + the last line
where mailbodyTemplate is a file name like "myworddocument.docx"![]()
Please Login or Register to view this content.
but in this case i get bad file name on the last line as wrdApp is empty of documents!
seems that Set wrdApp even though it complains that the file is already open, does not contain the open file?
any ideas how to get a referance to the already opened specific word document?
Bookmarks