Microsoft KB Archive/288787

= WD2002: Sample Macros for Word 2002 =

Q288787

-

The information in this article applies to:


 * Microsoft Word 2002

-

For a Microsoft Word 97 version of this article, see Q162490.

SUMMARY
Microsoft Word 2002 has available the following templates that contain sample macros:

Batch Conversion Wizard.wiz

Support.dot This article discusses these macro templates and explains how to use and view the macros.

Batch Conversion Wizard.wiz
The Batch Conversion Wizard.wiz file is a template that contains sample macros to perform a batch conversion of selected files to or from Word format.

How to Install the Batch Conversion Wizard
The Batch Conversion Wizard.wiz template is installed with the Microsoft Word 2002 Setup program. If the Batch Conversion Wizard.wiz 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.

Do one of the following:


 * In Microsoft Windows 98, Windows Millennium Edition (Me), or Windows NT 4.0, click to select Microsoft Office XP (Microsoft Word 2002) on the Install/Unistall tab, and then click Add/Remove.

-or-
 * In Microsoft Windows 2000, click to select Change or Remove Programs, click to select Microsoft Office XP (Microsoft Word 2002) in the Currently installed programs list, and then click Change.

In Microsoft Office XP Setup (Microsoft Word 2002 Setup), click to select Add or Remove Features, and then click Next.

In the Features to install list, follow these steps.

NOTE: Click the plus-sign (+) to the left of the feature to expand it.

 Click to expand Microsoft Word for Windows. Click to expand Wizards and Templates. Click the icon for More Wizards, and then click to select Run all from my computer on the shortcut menu that appears.

Click Update to install the Batch Conversion Wizard.wiz template.

How to Use the Batch Conversion Wizard
NOTE: To run the Batch Conversion macros without having to open the Batch Conversion.wiz template, please see the &quot;How to Make Sample Macros Available&quot; section of this article. To view the macro code of the sample macros in the Batch Conversion.wiz template, please see the &quot;How to View Sample Macro Code&quot; section of this article.

To use the Batch Conversion Wizard, follow these steps:
 * 1) On the File menu, click New. The New Document task pane should be displayed.
 * 2) In the New Document task pane, click to select General Templates.
 * 3) On the Other Documents tab, click to select Batch Conversion Wizard, and then click OK.

For more information about the Batch Conversion Wizard, click Microsoft Word Help on the Help menu, type Batch Conversion Wizard in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

Back to Top

Support.dot
The Support.dot template includes the following sample macros created by Microsoft Product Support Services:

How to Install the Support.dot Template
The Support.dot template is installed with a Complete Setup. It is not installed with a Typical or 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.

Do one of the following:


 * In Microsoft Windows 98, Windows Millennium Edition (Me), or Windows NT 4.0, click to select Microsoft Office XP (Microsoft Word 2002) on the Install/Unistall tab, and then click Add/Remove.

-or-
 * In Microsoft Windows 2000, click to select Change or Remove Programs, click to select Microsoft Office XP (Microsoft Word 2002) in the Currently installed programs list, and then click Change.

In Microsoft Office XP Setup (Microsoft Word 2002 Setup), click to select Add or Remove Features, and then click Next.

In the Features to install list, follow these steps.

NOTE: Click the plus-sign (+) to the left of the feature to expand it.

 Click to expand Microsoft Word for Windows. Click to expand Wizards and Templates. Click the icon for More Templates and Macros, and then click to select Run all from my computer on the shortcut menu that appears.

Click Update to install the Support.dot template.

How to Use the Support.dot Template
NOTE: To run the Support.dot macros without having to open the Support.dot template, please see the &quot;How to Make Sample Macros Available&quot; section of this article. To view the macro code of the sample macros in the Support.dot template, please see the &quot;How to View Sample Macro Code&quot; section of this article.

To use the Support.dot template, follow these steps:
 * 1) On the File menu, click Open.
 * 2) Change the Files of type box to Document Templates (*.dot).
 * 3) Change the Look in box to the following folder:
 * 4) Click to select Support.dot, and then click Open.
 * 5) In the table contained in the file, in the Macro column, click the appropriate button to run the macro that you want. For example, click the Troubleshoot Utility, Registry Options , or AutoCorrect Backup button.

Back to Top

Troubleshoot Utility

Use this utility to turn off the following components that are loaded during Word startup:
 * Word Data registry key
 * Normal.dot global template
 * Add-ins and templates
 * COM add-ins
 * Word Options registry key

If any of these items is damaged or incompatible, Word may fail to start or function correctly. You can temporarily bypass these and other items by starting Word with the /a switch.

To start Word by using the /a switch, follow these steps:
 * 1) Click Start and then click Run.
 * 2) In the Run dialog box, click Browse.
 * 3) Use the Look in box to locate Winword.exe, click to select it, and then click Open.

This step fills in the Open box in the Run dialog box.
 * 1) In the Open box, move the insertion point after Winword.exe.

NOTE: The path to the Winword.exe file in the Run dialog box is enclosed in quotation marks. Be sure to move the insertion point to the right of the closing quotation mark.
 * 1) Type a space, and then type /a.

The statement in the Open box should look similar to the following:

If Word starts and operates correctly when the /a switch is used, the problem is with one of these components. Use the Troubleshoot Utility to determine which component is causing the problem.

For additional information about how to use the Troubleshoot Utility, click the article number below to view the article in the Microsoft Knowledge Base: "Q289506 WD2002: How to Use the Troubleshoot Utility" For additional information about manually changing these components, click the article number below to view the article in the Microsoft Knowledge Base: "Q289294 WD2002: How to Reset User Options and Registry Settings" Back to &quot;How to Use Support.dot&quot;

Registry Options

The Registry Options macro can be used to modify Word settings that are stored in the Windows registry. For additional information about how to use the RegOptions macro, click the article number below to view the article in the Microsoft Knowledge Base: "Q289294 WD2002: How to Reset User Options and Registry Settings" Back to &quot;How To Use Support.dot&quot;

AutoCorrect Backup

For additional information about how to use the AutoCorrect Backup utility, click the article number below to view the article in the Microsoft Knowledge Base: "Q269006 WD2002: How to Move Word AutoCorrect Entries Between Computers" Back to &quot;How To Use Support.dot&quot;

How to Make Sample Macros Available
To make the sample macros available 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 they do before you decide to make them easily accessible), add the macro templates as global templates.

To add one of the templates listed in the &quot;Summary&quot; section of this article as a global template, follow these steps: On the Tools menu, click Templates and Add-Ins.

Under Global Templates and Add-ins, click Add.

Change the Look in box to the folder that contains the sample macro template. In the Files of type box, select All Files (*.*).

Select the sample macro template, and then click OK.

After the sample macro template appears in the Templates and Add-ins dialog box, make sure the check box for the template is selected, and then click OK.

IMPORTANT NOTE: 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 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 to select the template that you want to use macros from, and then click OK.

To run a specific macro, follow these steps:

 On the Tools menu, point to Macro, and then click Macros.</li> In the Macros dialog box, change the Macros in box to the template that contains the macro you want. For example, click to select either Support.dot (global template) or Batch Conversion Wizard.wiz (global template).</li> In the Macro name list, click to select the macro that you want, and then click Run.</li></ol>

Method 2: Add 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 Windows Explorer to place a copy of the sample macro template into the Startup folder.

When you start Microsoft 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 (each time 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 to select either Support.dot (global template) or Batch Conversion Wizard.wiz (global template).
 * 3) In the Macro name list, click to select the macro that you want, and then click Run.

Method 3: Copy the Macros into the Normal Template
To run a specific macro without having to open its template, copy the macros into your global template (Normal.dot). To do this, follow these steps: Open the sample macro template.

On the Tools menu, click Templates and Add-Ins.

In the Templates and Add-ins dialog box, click Organizer.

In the Organizer dialog box, click to select the Macro Project Items tab.

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 other side.

NOTE: If your Normal.dot (global template) is not open on the other side, click Close File on the other side. The Close File button on the other side changes to an Open File button. Click Open File. Click to select your Normal.dot template file, and then click Open.

On the sample macro template side, click to select the macro project items listed in sample macro template, and then click Copy.

NOTE: To select all of the items listed, hold down the CTRL key while you click to select each macro project item.

Click Copy to copy the macro project items to your Normal.dot template.

Click OK to close the Organizer dialog box.

To run a specific macro, follow these steps:

 On the Tools menu, point to Macro, and then click Macros.</li> In the Macros dialog box, change the Macros in box to the template that contains the macro that you want. For example, click to select Normal.dot (global template).</li> In the Macro name list, click to select the macro that you want, and then click Run.</li></ol>

Back to Top

How to View Sample Macro Code
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please see the following page on the World Wide Web: "http://www.microsoft.com/partner/referral/" For more information about the support options available from Microsoft, please see the following page on the World Wide Web: "http://support.microsoft.com/directory/overview.asp" 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 to select the appropriate sample macro template.
 * 3) Press and 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) Select the appropriate macro, and then click Edit.

Back to Top Additional query words: convert inf

Keywords : kbdta

Issue type : kbhowto

Technology : kbWordSearch kbWord2002 kbWord2002Search

Last Reviewed: May 24, 2001

-

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

© 2002 Microsoft Corporation. All rights reserved.