![]() If you’d like to learn how the VBA code exactly works, please leave a comment and I’d be happy to help. ![]() The exact content of the MsgBox will depend on the number of Word documents currently open. If Word displays a macro selecting dialog box, select the macro and click Run.Īfter you run the macro, Microsoft Word will display a MsgBox (Message Box) like the following: (5) Click the GREEN RUN ARROW on the toolbar, or press F5 key, or select Run > Run Sub/User Form from the menu to run the subprocedure. (4) Insert the following subprocedure code in your Code Pane: (3) Insert a new module by selecting Insert > Module from the menu. ![]() (2) Press ALT + F11 to display the VBA editing screen. (1) First select one of the open Word documents. You can switch from one open MS Word document to another by pressing CTRL + F6, in case you didn’t know.īut what if you have 16 Word documents open for some reason and you’d like to know their total number and view their file names so that you can decide whether to switch to them or perhaps close them off if you don’t need them anymore?īy writing a little VBA code, you can create a simple macro that would do exactly that.
0 Comments
Leave a Reply. |