WD2000: Converting Macros from Microsoft Word 97 to Microsoft Word 2000

ID: Q232465


The information in this article applies to:
  • Microsoft Word 2000


SUMMARY

No conversion of your Word 97 Visual Basic for Applications macros is needed for Word 2000. Several feature changes in Word, however, may affect the execution or result of your Word 97 macros when you run them in Word 2000.

This article discusses some changes you need to be aware of.

NOTE: This article does not cover converting macros from versions of Word earlier than Word 97 that used WordBasic.

For information about converting macros from WordBasic to Visual Basic for Applications, please see the "WordBasic Migration to Visual Basic" article located at the following Microsoft Web address:

http://www.microsoft.com/worddev/articles/wbmigrat.htm


MORE INFORMATION

The following are some of the changes you need to be aware of:

Single Document Interface (SDI)

In earlier versions of Word, the Multiple Document Interface (MDI) was used. Beginning with Word 2000, the Single Document Interface (SDI) replaces MDI. With SDI, every open Word document is represented in a new document window rather than in a new window within the Word application. This may cause problems for those who rely on the old MDI behavior. You should carefully test your code to make sure this doesn't cause problems. Problems are most likely to occur if your code uses the Windows Object.

Template Locations

Template locations have changed in Word 2000 to make it easier for roaming profiles. This change may affect your existing macros.

For additional information about template locations in Word 2000, please click the article numbers below to view the articles in the Microsoft Knowledge Base:
Q216595 WD2000: Categories, Locations, Registry Keys for Word Templates
Q210884 WD2000: General Questions and Answers on the Location of Word 2000 Templates
NOTE: Word 2000 still loads add-ins and templates from your previous Word 97 Startup folder for backward compatibility, but new solutions should be stored in the new locations.

Security

Major changes to security have been made in Word 2000; the most important is that Word 2000 is set to high security by default.

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

Office 2000 introduces digital signatures to help users distinguish legitimate code from undesirable code, such as viruses. If you open an Office document and see a macro security warning with digital signature information, you can feel reasonably confident that the person (or corporation) who signed the macros wrote them. You can choose to trust all macros signed by this person by selecting the Trust all macros from this source check box. After that, when you open a document that contains macros signed by this trusted source, Office turns on the macros without showing a security warning for the document.

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

For more information about security, please see the Microsoft Office 2000 Macro Security White Paper, which can be downloaded from the Word section of Microsoft Office Update, located at the following Web address:
http://officeupdate.microsoft.com/


REFERENCES

For additional information about available resources for creating custom solutions using Visual Basic for Applications and Microsoft Word 2000, please click the article number below to view the article in the Microsoft Knowledge Base:

Q212623 WD2000: Macro Programming Resources

Additional query words: vba

Keywords : kbdta wd2000
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: August 27, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.