Microsoft KB Archive/318719

= HOW TO: Use and View the Visual Basic for Applications Macros in Support.dot in Word 2002 =

Article ID: 318719

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Word 2002 Standard Edition

-



This article was previously published under Q318719



IN THIS TASK
SUMMARY
 * How to Install the Support.dot Template
 * How to Open the Support.dot Template
 * How to Make the Macros Available Globally
 * How to View the Macro Code



SUMMARY
This step-by-step article describes how to install and view the following Visual Basic for Applications macros. These macros were created by Microsoft Product Support Services and are included in the Support.dot template.

back to the top

How to Install the Support.dot Template
The Support.dot template is installed with a Complete Setup. The template is not installed with a Typical Setup or an Upgrade Now Setup. If the Support.dot template is not installed, follow these steps:  Quit Microsoft Word and all Microsoft Office programs. Click Start, point to Settings, and then click Control Panel. In Control Panel, double-click Add/Remove Programs. Follow the steps for your computer's operating system:  In Microsoft Windows 98, Microsoft Windows Millennium Edition (Me), or Microsoft Windows NT 4.0, click Microsoft Office XP (Microsoft Word 2002) on the Install/Uninstall tab, and then click Add/Remove.

-or- In Microsoft Windows 2000 or Microsoft Windows XP, click Change or Remove Programs. In the Currently installed programs list, click Microsoft Office XP (Microsoft Word 2002), and then click Change.</ul> </li> In Microsoft Office XP Setup (Microsoft Word 2002 Setup), click Add or Remove Features, and then click Next.</li> In the Features to install list, follow these steps: <ol style="list-style-type: lower-alpha;"> Expand Microsoft Word for Windows.</li> Expand Wizards and Templates.</li> Click the More Templates and Macros icon, and then click Run all from my computer on the shortcut menu.</li></ol> </li> Click Update to install the Support.dot template.</li></ol>

back to the top

How to Open the Support.dot Template
To open the Support.dot template, follow these steps: <ol> On the File menu, click Open.</li> Change the Files of type box to Document Templates (*.dot).</li> Change the Look in box to the following folder:

C:\Program Files\Microsoft Office\Office10\Macros\

</li> Click Support.dot, and then click Open.</li></ol>

back to the top

How to Make the Macros Available Globally
To make the macros available globally in Microsoft Word, use one of the following methods.

Method 1: Add to the Global Templates and Add-ins
If you plan to use the macros occasionally (or if you want to see what the macros do before you decide to make them easily accessible), add the macro templates as global templates.

To add one of the templates that is listed as a global template in the &quot;Summary&quot; section of this article, follow these steps: <ol> On the Tools menu, click Templates and Add-ins.</li> Under Global Templates and Add-ins, click Add.</li> Change the Look in box to the folder that contains the sample macro template. In the Files of type box, select All Files (*.*).</li> Select the sample macro template, and then click OK.</li> After the sample macro template appears in the Templates and Add-ins dialog box, make sure that the check box for the template is selected, and then click OK.

IMPORTANT: When you load a template in the Global Templates and Add-ins, the template remains loaded for the current Word session only. If you quit Word and then restart Word, the template is not automatically reloaded. You must reselect the template that you want to use. To do this, click Templates and Add-ins on the Tools menu. In the Templates and Add-ins dialog box, click the template from which you want to use macros, and then click OK.</li> To run a specific macro, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>On the Tools menu, point to Macro, and then click Macros.</li> <li>In the Macros dialog box, change the Macros in box to the template that contains the macro that you want. For example, click Support.dot (global template).</li> <li>In the Macro name list, click the macro that you want, and then click Run.</li></ol> </li></ol>

Method 2: Add the Template to the Startup Folder
Move the template into the Startup folder. Microsoft Word automatically has access to any macros in templates that are placed in the following folder:

C:\Program Files\Microsoft Office\Office10\Startup

Use Microsoft Windows Explorer to place a copy of the sample macro template into the Startup folder.

When you start Word, a template located in the Startup folder is loaded as a global template, and the macros in the template are available in the Macros dialog box. A disadvantage to this method is that Word may take a little longer to start. This is because each time that Word starts, Word loads these templates globally.

To run a specific macro, follow these steps:
 * 1) On the Tools menu, point to Macro, and then click Macros.
 * 2) In the Macros dialog box, change the Macros in box to the template that contains the macro that you want. For example, click Support.dot (global template).
 * 3) In the Macro name list, click the macro that you want, and then click Run.

Method 3: Copy the Macro into the Normal Template
To run a specific macro without having to open the template for that macro, copy the macro into your global template (Normal.dot). To do this, follow these steps: <ol> <li>Open the sample macro template.</li> <li>On the Tools menu, click Templates and Add-ins.</li> <li>In the Templates and Add-ins dialog box, click Organizer.</li> <li>In the Organizer dialog box, click the Macro Project Items tab.</li> <li>The macros in the sample macro template are listed on one side of the dialog box. Your global template (Normal.dot) appears open on the opposite side.

NOTE: If your Normal.dot file (global template) is not open, click Close File on the opposite side. The Close File button changes to an Open File button. Click Open File. Click your Normal.dot file, and then click Open.</li> <li>On the sample macro template side, click the macro project items that are listed in the sample macro template, and then click Copy.

NOTE: To select all of the items that are listed, hold CTRL while you click each macro project item.</li> <li>Click Copy to copy the macro project items to your Normal.dot template.</li> <li>Click OK to close the Organizer dialog box.</li> <li>To run a specific macro, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>On the Tools menu, point to Macro, and then click Macros.</li> <li>In the Macros dialog box, change the Macros in box to the template that contains the macro that you want. For example, click Normal.dot (global template).</li> <li>In the Macro name list, click the macro that you want, and then click Run.</li></ol> </li></ol>

back to the top

How to View the Macro Code
To view the macro code for a sample macro, follow these steps:
 * 1) On the File menu, click Open.
 * 2) In the Open dialog box, change the Look in box to the folder that contains the sample macro template, change the Files of type box to All Files (*.*), and then click the appropriate sample macro template.
 * 3) Hold SHIFT and click Open.
 * 4) On the Tools menu, point to Macro, and then click Macros.
 * 5) In the Macros dialog box, change the Macros in box to the sample macro template that you just opened.
 * 6) Click the appropriate macro, and then click Edit.

back to the top

Additional query words: inf VBA VBE

Keywords: kbdta kbhowto kbhowtomaster KB318719

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.