Hi people,
I have a Word 2010 macro which allows a user to choose a target folder (via a userform) and which will then apply the same changes to every document in that folder. In order for any user to run the macro, I have pasted it from my personal macro and put it in a document. When the user clicks a button the userform appears and off they go.
Unfortunately because the macro is now in the file with the button, this file has to remain open while the macro runs. Even with Screen Updating turned off, every time the macro opens a new document, the screen displays it for a moment and every time a document is closed the original button file is shown in a flash.
When I run the macro from my personal macro folder this does not happen as I do not need to have any files open - I just see a blank screen and the status bar updates indicating progress.
I therefore would like to know how to stop this flashing - either by minimising the original document even while the macro runs or by some other means. I have tried playing around with ShowModal in the userform "ActiveDocument.Windows(1).WindowState = wdWindowStateMinimize" as the first action the macro performs but so far to no avail.
Any suggestions very gratefully received!
I have a Word 2010 macro which allows a user to choose a target folder (via a userform) and which will then apply the same changes to every document in that folder. In order for any user to run the macro, I have pasted it from my personal macro and put it in a document. When the user clicks a button the userform appears and off they go.
Unfortunately because the macro is now in the file with the button, this file has to remain open while the macro runs. Even with Screen Updating turned off, every time the macro opens a new document, the screen displays it for a moment and every time a document is closed the original button file is shown in a flash.
When I run the macro from my personal macro folder this does not happen as I do not need to have any files open - I just see a blank screen and the status bar updates indicating progress.
I therefore would like to know how to stop this flashing - either by minimising the original document even while the macro runs or by some other means. I have tried playing around with ShowModal in the userform "ActiveDocument.Windows(1).WindowState = wdWindowStateMinimize" as the first action the macro performs but so far to no avail.
Any suggestions very gratefully received!