We have a word macro which generates a word document, opens it, and then "Save As" with a specified filename.
The word document is launched from a hyperlink on a web page.
The problem is if the user has this document open and it is minimized somewhere on the screen, the user cannot click on the link again to run the macro until this document is closed.
If he does, it will cause an error.
We have the filename but we need a check to see if this file is open; and if so, we need to close the word document before we save it.
Does anyone know of any vba code to perform this check?
Thanks in Advance.
John
The word document is launched from a hyperlink on a web page.
The problem is if the user has this document open and it is minimized somewhere on the screen, the user cannot click on the link again to run the macro until this document is closed.
If he does, it will cause an error.
We have the filename but we need a check to see if this file is open; and if so, we need to close the word document before we save it.
Does anyone know of any vba code to perform this check?
Thanks in Advance.
John