Examining Styles and Macros in a Template

Written by Allen Wyatt (last updated July 6, 2019)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365


1

Templates are designed to contain a collection of styles, macros, and other customizations that can be used to help consistently develop a document or series of documents. If you receive a template from someone else (or open one that you created years ago), you may wonder if there is a way to display the details of the styles and macros contained within that template.

There is no built-in way to do this, unfortunately. (It would be very helpful if there were.) Word allows you to see which styles are in a template or, for that matter, in a document relatively easily. All you need to do is load the template and use the Organizer to look at the styles it contains. If you prefer, you could use a macro to list in a new document all the styles in the current one. There are many ways to approach such a task; the following is one written by Jessica Weissman:

Sub describeAllStylesWeCareAbout()
'  by Jessica Weissman

    Dim docActive As Document
    Dim docNew As Document
    Dim styleLoop As Style

    Set docActive = ActiveDocument
    Set docNew = Documents.Add
    For Each styleLoop In docActive.Styles
        If styleLoop.Type < 3 Then
        ' show only character and paragraph styles, not list or table styles
            With docNew.Range
                .InsertAfter Text:=styleLoop.NameLocal & Chr(9) _
                  & styleLoop.Description
                .InsertParagraphAfter
                .InsertParagraphAfter
            End With
        End If
    Next styleLoop
End Sub

The problem with either approach (Organizer or special macro) is that they don't list any modifications to built-in styles that are often so important to design a template effectively. For instance, if the Normal style on a system is normally set to 10-point Arial and that has been changed to 12-point Times New Roman in the template, there is no way with the above solutions to tell that this change has been made; you only know that the template uses the Normal style. (Duh! All templates contain the Normal style.)

When it comes to macros, you need to load the template and simply go look in the Visual Basic Editor. There is where you'll find the macros and be able to try to figure out what they do. (Make sure you use the Project window to look for VBA projects specifically associated with the template.)

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (12715) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Displaying the AutoShapes Menu

AutoShapes are very useful for adding common drawing shapes to your document. You can make the AutoShapes easier to ...

Discover More

Creating a Function Inventory for a Workbook

Your worksheets are very often made up of formulas and these formulas are made up of functions. If you ever want to ...

Discover More

Removing Cells Containing Specific Terms

Macros are great for processing large amounts of data quickly. This tip examines several ways you can remove specific ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (ribbon)

Best Way to Create a Document Template

Templates are the basis of creating consistent documents that permit fast and easy formatting. What is the best way to ...

Discover More

Updating Many Template References

Documents rely on templates. If you change the location of those templates (on purpose or by accident), Word can take a ...

Discover More

Working on Shared Templates

In many companies it is common to have standard templates accessible through the internal network. If you have templates ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

2019-07-06 12:28:50

Anne Denniston

All versions of Word can print a useful list of the styles used in your document with a description of what is in them, as shown in the figure below. On the left, the Print Option is set to Styles, and on the right is the resultant list. (see Figure 1 below)
I printed to PDF with 'PDFill' (a versatile free program) and then opened the PDF with Word, which converted it into an editable Word document. It looked good because it retained bolding and converted tabs to spaces.
When I printed with 'Microsoft Print to PDF' and then opened the PDF with Word, the editable Word document did not retain bolding but also converted tabs to spaces.

Figure 1. How to obtain a descriptive list of Normal styles


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.