How to convert macros from Microsoft Word 97 to Microsoft Word 2002 (827893)



The information in this article applies to:

  • Microsoft Word 2002

For a Microsoft Word 2000 version of this article, see 827890.

SUMMARY

No conversion of your Microsoft Word 97 Visual Basic for Applications (VBA) macros is required for Microsoft Word 2002. Several feature changes in Word may affect the execution or result of your Word 97 macros when you run them in Word 2002.

This article discusses some changes that you must be aware of.

Note This article does not cover how to convert macros from versions of Word that are earlier than Word 97 that use WordBasic.

For information about how to convert macros from WordBasic to VBA, visit the following Microsoft Web site:

MORE INFORMATION

The following are some of the changes that you must be aware of.

Single Document Interface (SDI)

In earlier versions of Word, the Multiple Document Interface (MDI) was used. Starting with Word 2000, the Single Document Interface (SDI) replaces MDI. With SDI, every open Word document is represented in a new document window instead of in a new window in the Word program. This may cause problems for those who rely on the old MDI behavior. You must carefully test your code to make sure that this does not cause problems. Problems are most likely to occur if your code uses the Windows Object.

Template locations

The template locations for Word 2002 depend on the operating system of the computer where Word is installed and the type of template.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

291141 Categories, locations, and registry keys

Security

Major changes to security have been made in Word 2002; the most important is that Word 2002 is set to high security by default. Additionally, security options such as password protection, file sharing options, digital signatures, and macro security are now conveniently collected on a single Security tab in the Options (on the Tools menu) dialog box.

The Microsoft Office XP Macro Security white paper discusses how you can prevent the introduction of macro viruses in your computer by using Office XP.

Office XP offers digital signatures to help users distinguish legitimate code from unwanted code, such as viruses. If you open an Office document and see a macro security warning with digital signature information, you should examine the signature and its associated certificate to establish confidence in the person (or corporation) that signed the macros, and confirm that the macros have not been changed since they were written. You can choose to trust all macros that are signed by this person (or corporation) by checking the Trust all macros from this source check box. Thereafter, when you open a document that contains macros that are signed by this trusted source, Office enables the macros and does not display a security warning for the document.

If you use the Office XP digital signature features as advised in this white paper, you will not receive annoying security warnings for any one of the macro solutions that you write or that you use. You will only receive a security warning when it is justified; that is, when you open a document that has unexpected macros or viruses.

For more information about security, see the Microsoft Office XP Macro Security White Paper. To download the Microsoft Office XP Macro Security White Paper, visit the following Microsoft Web site:

Visual Basic object model

Extensive changes have been made to the Microsoft Office Visual Basic object model to support new and improved features in shared components. Many objects, properties, methods, and events have been added.

For more information, visit the following Microsoft Web site:

REFERENCES

For more information about available resources for creating custom solutions using Visual Basic for Applications and Microsoft Word 2002, click the following article number to view the article in the Microsoft Knowledge Base:

305326 Programming resources for Visual Basic for Applications


Modification Type:MinorLast Reviewed:7/27/2006
Keywords:kbinfo KB827893 kbAudEndUser