I'm trying to automate a number of tasks required to modify Word 2010 files.
I want to assign individual macros to active-X buttons in a controller file (e.g. controlFile.dotm) which I will keep open beside the Word files i am modifying (I have macro snippets currently in normal.dotm)
I can create the controller file, buttons and link them to VBA snippets (by copying the snippets into controlFile.dotm)
The Word files I wish to target will already be Open on my desktop and all have a defined filename structure which contains a specific string, say 'sometextABCsometext'
In addition to the open Word files I'm targeting, i need to have other Word files open which I don't want to target with the VBA snippets, say 'leavemealone1.docx' and 'leavemealone2.docx'
How can I get the macros to act on any Word file whose filename contains the string 'ABC' but not work on other Word files which might be open at the time?