Thread: [Solved] Locking word to run macro
View Single Post
 
Old 07-12-2018, 07:37 AM
ajwilliams77 ajwilliams77 is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Jul 2018
Posts: 3
ajwilliams77 is on a distinguished road
Default 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
Reply With Quote