The Macro Zone

VBA in Microsoft Word for Windows

Jay Freedman  Microsoft Most Valuable Professional

 Templates available for download

Use the VBA macro code in these templates to learn how to solve problems for yourself. Most of the templates contain text that explains how the macros work, and the macros themselves contain comments.

Unless indicated otherwise, the macros in these templates work in Word 2000, 2002 (XP), and 2003. They may or may not work in Word 97 or in Word 2007.

AutoCorrect2007.zip The AutoCorrect backup/restore template from the Word MVP FAQ, updated for use with Word 2007.

autotextdumper.zip Utility for dumping all AutoText entries from a template to a document. Word 2000–2003 only.

autotextloader2.zip Utility for loading a large number of AutoText entries into a template. Word 2000–2003 only.

bookmarks.zip An improved version of the Promotional Bookmarks template on the Office site.

finder.zip A Find dialog like the one in Adobe Reader, showing all occurrences of a term. Works in all versions from Word 2000 to 2007.

form_picture.zip Demo of a method for inserting a picture into a locked form.

workdocuments.zip  New  An add-in for Word 2007 to replace the Work menu of Word 2003 and earlier. Unzip the workdocument.dotm file into the folder located at %appdata%\Microsoft\Word\Startup and restart Word. A "Work Documents" button will be added to the Quick Access Toolbar to launch the add-in.

zip_to_city.zip Demo of a method for inserting a zip code list in a userform.

 

Locations of visitors to this page