The Macro Zone

VBA in Microsoft Word for Windows

Jay Freedman  Microsoft Most Valuable Professional

cover of Microsoft Word 2013 Plain and Simple

Get the book!

On Microsoft Press store or on Amazon or on B&N


 Templates available for download
(and other stuff)

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. Some specify that they're for Word 2000 to 2003 only, while others say they're for use in Word 2007 to 2013 only. As of this writing, templates that work in Word 2013 will also work in Word 2016.

Most of the templates should be stored in your Templates folder and used to create new documents. The few that are add-ins explicitly refer to the instructions for storing them in Word's STARTUP folder.

Stop Reconfiguring Two or More Versions of Word on the Same Computer If you have two or more versions installed, each one wants to reconfigure after you run another one. This article explains how to stop that, without manually editing the registry.

2014_Calendars.zip A group of three templates for 12-month calendars for 2014. Each calendar is provided in both Word 97-2003 (*.dot) and Word 2007-2013 (*.dotx) format. These templates are based on the ones from Microsoft Office Online.

2015_Calendars.zip A group of three templates for 12-month calendars for 2015. Each calendar is provided in both Word 97-2003 (*.dot) and Word 2007-2013 (*.dotx) format. These templates are based on the ones from Microsoft Office Online.

New Classic Blue Calendar MSExcel iconAn Excel workbook containing monthly calendars from November 2014 through December 2016, courtesy of Elizabeth Golding.

AutoCorrect2007.zip Revised June 2015 The AutoCorrect backup/restore template from the Word MVP FAQ, updated for use with Word 2007, 2010, and 2013. Thanks to MVP Graham Mayor for improvements, including a progress bar and elimination of "not responding" states.

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.

bookmark_addin.zip An add-in that displays on the status bar the name of any bookmark that you select. Works in all versions. To install it, follow the instructions below under "SaveView2013.zip".

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 2016.

form_picture.zip Demo of a method for inserting a picture into a locked form.
If you use table cells to hold the pictures, the pictures will be automatically resized to fit the cells. Different pictures can be inserted at different sizes.

New goto_endnote.zip An add-in that enables you to specify the section and number of an endnote to go to, in a document where the endnote numbers restart at 1 in each section. To install it, follow the instructions below under "SaveView2013.zip".

New NewDocUserform.zip An add-in that displays a New Document dialog in the efficient List format. You can choose to show the templates in any folder, including network locations. This is especially useful to replace the huge File > New page in Word 2013 and 2016, but it also works in Word 2007 and 2010. It adds a button to the Quick Access Toolbar. To install it, follow the instructions below under "SaveView2013.zip".

New SaveView2013.zip Word 2013 and Word 2016 force all documents to open in Print Layout view. This add-in restores the behavior of previous versions, saving the current view and zoom in the file and showing that view when you reopen the document. Includes Graham Mayor's contribution here. To install it, follow the instructions below.

  Instructions for installing template add-ins: Right-click the downloaded zip file, click Properties, and click the Unblock button; then click OK. Extract the .dotm file from the zip file. In Windows Explorer, type or paste the following expression into the address bar and then press Enter:

  %appdata%\Microsoft\Word\STARTUP

Paste the .dotm file into that folder. If Word is running, close it and reopen it.

EQ field switches This is a copy of the "EQ field switches" page from the Word 2003 Help file. It seems that this information is no longer available on the Microsoft web site, and copies I've found elsewhere are incomplete.

WordBasic Help file This exe file installs the Help from Word 95 WordBasic. You need this reference if you're converting an old macro.

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

 

Previous visitor totals:

Visitor map through March 2015