Microsoft KB Archive/237356

From BetaArchive Wiki

Article ID: 237356

Article Last Modified on 5/7/2007



APPLIES TO

  • Microsoft Word 2000 Standard Edition



This article was previously published under Q237356

SUMMARY

Microsoft Word 2000 has the following three templates that contain sample macros:

  • Batch Conversion Wizard.wiz
  • Macros9.dot
  • Support9.dot

This step-by-step article discusses these templates and macros and explains how to access these macros.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers 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 requirements. back to the top

Access Word Sample Macros

To access the Word sample macros, follow these steps:

  1. Make sure that the appropriate sample macro template is installed. For more information about each sample macro template, please see the appropriate macro template section in this article.
  2. Decide how often you plan to use the macros. If you intend to use the macros only occasionally, or if you want to see what the macros do before you decide whether you want to make them easily accessible, use Method 1. If you plan to use the macros often, use either of the options discussed in Method 2. If you want to view the sample macro, use Method 3. back to the top

    Method 1: For Occasional Use of Macros

    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 files listed in the "Summary" section as a global template, follow these steps:

    1. On the Tools menu, click Templates and Add-Ins.
    2. Under Global Templates and Add-ins, click Add.
    3. In the Look in box, change to the folder that contains the sample macro template. In the Files of type box, select All Files (*.*).
    4. Select the sample macro template, and then click OK.
    5. Repeat steps c and d for each of the sample macro templates that you want to use.
    6. After the sample macro templates appear in the Templates and Add-ins dialog box, make sure you select the check box for the ones that you want to load, and then click OK.

    NOTE: When you load a template or add-in, it remains loaded for the current Word session. If you quit and then restart Word, the template or add-in is not automatically reloaded.

    back to the top

    Method 2: For Frequent Use of Macros

    Option 1: Move the Templates into the Startup Folder

    Word automatically has access to any macros in templates that are placed in the following folder:

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

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

    When you restart Word, these templates are global templates, and the macros are visible in the Macro dialog box. A disadvantage to this method is that Word takes a little longer to start (each time it starts, it loads these templates globally).

    back to the top

    Option 2: Copy the Macros into the Normal Template

    Follow these steps to copy the macros into your global template (Normal.dot):

    1. Open the sample macro template.
    2. On the Tools menu, click Templates and Add-Ins, click Organizer, and then select the Macro Project Items tab.
    3. 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.
    4. Select the macros in sample macro template, and then click Copy. Click OK to close the Organizer.
    5. Repeat steps a through d for each of the sample macro templates that you want to add macros from.

    back to the top

    Method 3: View the Sample Macro

    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. Hold SHIFT and then click Open.
    4. On the Tools menu, point to Macro, and then click Macros.
    5. In the Macros dialog box, change Macros in to the sample macro template.
    6. Select the appropriate macro, and then click Edit.

back to the top

Batch Conversion Wizard.wiz

The Batch Conversion Wizard template is a template that contains sample macros to perform a batch conversion of selected files to or from Word format. It is installed on first use by default. The Batch Conversion Wizard is installed to the following folder by default:

C:\Program Files\Microsoft Office\Templates\1033


To run the Batch Conversion Wizard, follow these steps:

  1. On the File menu, click New.
  2. In the New dialog box, click to select the Other Documents tab.
  3. 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 the top

Macros9.dot

The Macros9.dot template contains the following sample macros.

Macro                          Description
---------------------------------------------------------------------

AutoCorrect Utility            Allows you to back up, restore, and move
                               AutoCorrect entries.

Automation Examples            Simple macro examples demonstrating
                               automation between Word, Excel, and
                               Access.

Find Symbol                    Allows you to find and replace symbols
                               in your documents.

Font Sample Generator          Generates a sample document of all the
                               printable fonts on your system in 12
                               point.

Insert Footnote                A wizard interface that helps you
                               create footnotes in the MLA or Chicago
                               Manual of Style format.

Modify Address Layout          Modifies the layout of an address that
                               you insert when you use the Personal
                               Address Book, Schedule+, or Outlook
                               Contacts List.

Save Reminder Install          Installs into your Word Startup folder
                               a template containing a macro that
                               periodically reminds you to save your
                               work.

WordPerfect Data Formatter     Converts certain types of non-standard
                               WordPerfect data files and labels into
                               a format that can be used as a mail
                               merge data file.
                    

back to the top

How to Install the Macros9.dot Template

To install the Macros9.dot template, follow these steps:

  1. Download the Word 2000 Supplemental Macros file from the following Microsoft Web site:
  2. Download the file (Macros.exe) by clicking Download Now! and following the instructions in the dialog boxes.
  3. Double-click the Macros.exe program file on your hard disk to start the Setup program.
  4. Follow the instructions on the screen to complete the installation.

back to the top

How to Use the Macros9.dot Template

To use the Macros9.dot template, follow these steps:

  1. Open Microsoft Word 2000.
  2. On the File menu, select Open.
  3. Change Files of Type to Document Templates (*.dot).
  4. Change Look in to the location on your hard disk where Macros9.dot was installed. Macros9.dot is installed by default to the following folder:

    C:\Program Files\Microsoft Office\Office\Samples\

  5. Select Macros9.dot, and then click Open.

    NOTE: If you receive the following message, click Enable Macros. If the Enable Macros button is not available, click to select the Always trust macros from this source check box, and then click Enable Macros.

    C:\Program Files\Microsoft Office\Office\Samples\Macros9.dot

    contains macros by

    Microsoft Corporation

    Macros may contain viruses. It is always safe to disable macros, but if the macros are legitimate, you may lose some functionality.

    The security level is set to High. Therefore, you cannot enable macros from sources that you do not trust.

  6. To run a macro, on the Macros toolbar, click Sample Macros, and then select the macro that you want to run.

For additional information about security levels, click the article numbers below to view the articles in the Microsoft Knowledge Base:

233396 WD2000: How to Reduce the Chances of Macro Virus Infection


192073 WD2000: Error Message: The Macros in the Project Are Disabled


back to the top

Support9.dot

The Support9.dot template includes the following sample macros created by Microsoft Technical Support:

   Macro                      Description
   ----------------------------------------------------------------------

   Edit Conversion Options    Allows you to customize unique settings for
                              text converters and graphics filters.

   Registry Options           Can be used to modify Word settings that are
                              stored in the Windows registry.
                

The Support9.dot template is located on CD1 of your Microsoft Office 2000 or Microsoft Word 2000 CD-ROM set, and can be installed with Microsoft Office 2000 or Microsoft Word 2000 Setup.

back to the top

To Install Support9.dot

Follow these steps to install the Support9.dot template:

  1. Quit all Microsoft Office programs.
  2. Click Start, point to Settings, and then click Control Panel.
  3. Double-click Add/Remove Programs.
  4. On the Install/Uninstall tab, select Microsoft Office 2000 or Microsoft Word 2000, and then click Add/Remove.


NOTE: For Microsoft Windows 2000, in the list of Currently Installed Programs, click Microsoft Office 2000 or Microsoft Word 2000, and then click Change.

NOTE: Insert CD1 of your Microsoft Office 2000 or Microsoft Word 2000 CD-ROM set when Setup requests it.

  1. In Maintenance Mode Setup, click Add or Remove Features.
  2. In the Update Features dialog box, expand Microsoft Word for Windows.
  3. Expand Wizards and Templates.
  4. Click the down arrow for More Wizards and Templates, and then click to select Run from My Computer.
  5. Click Update Now.

Click OK after Setup completes and a message similar to the following appears:

Microsoft Office 2000 Premium Setup completed successfully.


For more information about installing (or removing) individual components in Word, click Microsoft Word Help on the Help menu, type How do I install components? in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

back to the top

How to Use Support9.dot

Use one of the following methods to use the macros in the Support9.dot template.

Method 1: Add the Support9.dot Template as a Global Add-in

Follow these steps to run the Support9.dot template as an add-in:

  1. In Word, click Templates and Add-ins on the Tools menu.
  2. In the Templates and Add-ins dialog box, click Add.
  3. In the Add Template dialog box, change the Look in box to the following folder:

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

  4. Select Support9.dot and then click OK.

    NOTE: The Support9.dot template will be added to the Global templates and add-ins box in the Templates and Add-ins dialog box.
  5. Click OK. A Macros toolbar appears.

    NOTE: If the Macros toolbar does not appear, point to Toolbars on the View menu, and then click Macros.
  6. On the Macros toolbar, click Sample Macros, and then you can select either the Edit Conversion Options macro or the Registry Options macro.

back to the top

Method 2: Open the Support9.dot Template

  1. In Word, click Open on the File menu.
  2. In the Open dialog box, change the Look in box to the following folder:

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

  3. Click to select Support9.dot, and then click Open. To copy the Support9.dot sample macros to your Normal.dot template, follow these steps:

    1. On the Tools menu, point to Macro, and then click Macros.
    2. Click Organizer.
    3. Open Support9.dot in the left pane and Normal.dot in the right pane.
    4. Select the Macro Project Items tab.
    5. Use the Copy button to copy the appropriate Modules and Forms from Support9.dot to your Normal.dot template, and then click Close to close the Organizer. Copy the following from the Support9.dot template to your Normal.dot template:

      • CConverterTable
      • Common
      • EditCnvOptionsForm
      • EditOptCommon
      • RegOptions
      • RegOptionsForm


  4. On the Macros toolbar, click Sample Macros, and then click either Edit Conversion Options or Registry Options.

back to the top

Edit Conversion Options

With the Edit Conversion Options macro, you can customize unique settings for graphics filters.

   Conversion                      Options
   ------------------------------------------------------------------------

   Graphics Interchange Format     SetMetafileBackgroundTransparent=No
   (Export)                        ShowProgressDialog=Yes
                                   ShowMetafileBackgroundTransparent=No

   JPEG File Interchange Format    ShowProgressDialog=Yes
   (Export)                        Quality=0x0000004b

   Graphics Interchange Format     ShowProgressDialog=Yes
   (Import)

   JPEG File Interchange Format    ShowProgressDialog=Yes
   (Import)

   Macintosh PICT                  ShowProgressDialog=Yes

   PC Paintbrush                   ShowProgressDialog=Yes

   Tag Image File Format           ShowProgressDialog=Yes

   Windows Bitmap                  ShowProgressDialog=Yes
                

back to the top

Registry Options

The Registry Options macro can be used to modify Word settings that are stored in the Windows registry. The following table lists each of the options available in the macro and a brief description of its purpose.

Word 2000 Options

   Option                     Description
   ------------------------------------------------------------------------

   AutoSave-Path              Sets the folder where AutoRecovery save files
                              are written to. If you use Microsoft Word on
                              a computer running Microsoft Windows 95 or
                              Windows 98, automatically recovered files are 
                              by default stored in the Windows\Application
                              Data\Microsoft\Word folder. If you use
                              Microsoft Windows NT version 4.0 or later, or 
                              you use a computer on which there is more
                              than one active user profile, automatically
                              recovered files are stored in the
                              "\Windows\Profiles\username\Application
                              Data\Microsoft\Word" folder.

   Bak-Extension              Sets the default extension for Word backup
                              files. The default extension is *.wbk.

   BitMapMemory               Sets the maximum size of the Word bitmap
                              cache (in KB). If you use many graphics in
                              your documents, a larger bitmap cache may
                              improve scrolling and screen redraw speed.
                              When set to 1, Word automatically
                              adjusts the bitmap cache size.

   CacheSize                  Sets the size of the Word file cache (in KB).
                              You may be able to improve the speed of file
                              I/O and other operations in Word by
                              increasing the cache size. The minimum and
                              default cache size is 64 KB.

   DateFormat                 Sets the default data format for the DATE
                              field. This is used only for backward
                              compatibility purposes. Word 2000 uses a
                              different format.

                              Example: MMMM d, yyyy

   DOC-Extension              The default extension that is used for
                              Word documents. The default is *.doc. You
                              must restart Word for modifications to take
                              effect.

   DOC-Path                   The default folder that is used for Word
                              documents. The default is C:\My Documents.

   DOT-Extension              The default extension that is used for
                              Word templates. The default is *.dot. You
                              must restart Word for modifications to
                              take effect.

   INI-Path                   Path for user options. This is used only for
                              backward compatibility purposes. Note that
                              Word 2000 user options are stored in the
                              Windows registry or internally.

   NoFontMRUList              Turns on or off the most recently used (MRU)
                              font list. You must restart Word for the
                              modifications to take effect. Enter either
                              0 or 1.

                              0 - Turn on MRU font list.
                              1 - Turn off MRU font list.

   OLEDOT                     Specifies the document template used when
                              creating a document object in Word or
                              another OLE application.

   Picture-Path               Sets the default path used when you select 
                              Insert Picture. You must restart Word before
                              this setting takes effect. You can also
                              use the File Locations tab (on Tools menu,
                              click Options) to modify the setting.

   ProgramDir                 Specifies where the Word program files are
                              located.

                              Default path: C:\Program Files\Microsoft
                              Office\Office

   SlowShading                Allows you to shade graphics by overriding a
                              special drawing function on some Hewlett
                              Packard printers. Using this option slows
                              printing. If a printer does not support this
                              special drawing function, the switch has no
                              effect. Enter 0 for No, 1 for Yes.

   Startup-Path               Sets the path for Word startup files, such as
                              templates and WLLs to load when starting
                              Word.

                              Built-in default path: C:\Windows\Application
                              Data\Microsoft\Word\Startup

   TimeFormat                 Sets the default time format for the TIME
                              field. This is used only for backward
                              compatibility purposes. Word 2000 uses a
                              different format.

                              Example: h:mm:ss

   Tools-Path                 Sets a location in which Word searches for
                              proofing tools, filters, converters, and
                              certain other components, in the event that
                              they are not registered properly or cannot
                              be found in their standard directories.

   UpdateDictionaryNumber     Specifies the custom dictionary for the
                              spelling checker; the number corresponds
                              to the order of the custom dictionary
                              in the list in the Custom Dictionary
                              box in the Options dialog box of the
                              Spelling & Grammar tab.

   User-Dot-Path              Path for user templates. Note that when
                              this setting is changed for Word, it 
                              affects all the Microsoft Office 2000
                              applications, including the Office Shortcut
                              bar.

                              Built-in default path: C:\Windows\Application
                              Data\Microsoft\Templates

   Workgroup-Dot-Path         Path for workgroup templates. You can specify
                              a UNC path.

                              For example: \\Group\User\Mytmplts
                

Equation Editor Options

   Option                     Description
   ------------------------------------------------------------------------

   Appdir                     The Equation Editor program folder. Equation
                              Editor must be installed and run one time 
                              for this and other Equation Editor
                              settings to appear.

   CustomZoom                 The Custom Zoom setting. This only takes
                              effect when Equation Editor is started in a
                              separate window with the ForceOpen setting.

   ForceOpen                  Forces Equation Editor to open in its own
                              separate window. Enter 0 or 1.

                              0 - Open in place.
                              1 - Open in a separate window.

   ShowAll                    Shows or hides non-printing characters.

   ToolBarDocked              Is the toolbar docked? 1 is Yes, 0 is No.

   ToolBarDockPos             Position of the toolbar when it is docked:

                              1 - Top of the EQ Editor window.
                              2 - Bottom of the EQ Editor window.

   ToolBarShown               Is the toolbar shown? 1 is Yes, 0 is No.

   ToolBarWinPos              Position of the toolbar when it is not
                              docked, specified in X, Y coordinates
                              with the upper left corner as the origin.
                              The units are in pixels.

   Version                    Equation Editor version number.

   Zoom                       Standard zoom size selected on the View menu.
                

back to the top


Additional query words: convert

Keywords: kbdownload kbhowto kbhowtomaster KB237356