Locking word to run macro
Hi,
I am new to VBA and trying my best to learn "on the job". I have managed to create a simple macro that adds logos and watermarks and save to a file location which is working correctly. However, if there is more than one word document open and they change focus to the other document while the macro is running, the code runs against the document now in focus (which is not what we want).
Is there a way to lock word while the macro is being run in order to prevent the user from selecting a different document?
Many thanks,
Andrew
|