Get the latest news, exclusives, sport, celebrities, showbiz, politics, business and lifestyle from The VeryTime,Stay informed and read the latest news today from The VeryTime, the definitive source.

How to Use Word Document Map With VB

48
    • 1). Click the "Office" button, then click the "New" command. Click the "Create" button to create a new, blank document.

    • 2). Click the "Office" button, then click the "Options" button. Click the "Show developer" check box to display the controls needed to work with VBA.

    • 3). Click the "Record" button, then type a name for the macro that relates to displaying the document map. For example, type "showDocumentMap."

    • 4). Click the down arrow of the "Store macro in" list, then click "Normal.dot." This tells Word you want to store the VBA macro in the "Normal.dot" template. Doing this will make the macro available to all Word documents.

    • 5). Click the "Keyboard" button to open a dialog box allowing you to specify a key sequence with which to run the macro. Press "Alt" and "C" simultaneously to assign this key sequence to your document map macro.

    • 6). Click "OK" to finalize the key assignment and tell Word to begin recording the macro. Click the "View" menu, then click the "Document map" check box to display the document map.

    • 7). Click the "Developer" tab's "Stop recording" button, then click the "Macros" button to display a list of VBA macros.

    • 8). Click the name you typed in Step 3, then click the "Edit" button to enter the VBA programming environment. The code window will display the following statement, which VBA created when you clicked the "Document map" check box.

      ActiveWindow.DocumentMap = True

      Use new VBA statements to toggle the document map on and off each time you press the "Alt+C" key sequence you entered in Step 5.

    • 9). Replace the VBA statement just listed with the following statement, which tells VBA to assign a value to the "DocumentMap" property that's opposite to that property's current value.

      ActiveWindow.DocumentMap = not ActiveWindow.DocumentMap

    • 10

      Click the "Word" icon on the Windows task bar to return to Word. Press "Alt" and "C" simultaneously, and repeatedly. Each time you press this key sequence, the document map will either open or close. The VBA program you just wrote is responsible for this behavior.

Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.