Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Printing a Full Style Sheet.
Written by Allen Wyatt (last updated April 23, 2022)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021
Dave would love a way to print a full-featured style sheet for his documents. He knows that he can choose to print "Styles" in the Print dialog box, but he would rather have a style sheet that shows the actual styles, such as color, size, font, etc.
Unfortunately, there is no such capability in Word. You can, however, create a style sheet of your liking by using a macro. For instance, the following will insert, in the current document, the names of all the styles available in the document. Each style name is on its own line (paragraph) and is formatted using the various styles.
Sub ListStyleNames() Dim s As Style For Each s In ActiveDocument.Styles With Selection .Style = s .TypeText (s.NameLocal) .TypeParagraph End With Next s End Sub
Such an approach, while handy for a concise list of styles, isn't much more informative than what can be printed using the "Styles" designation in the Print dialog box. It does, however, provide a basis upon which one can build to create a more full-featured style sheet.
The problem with creating a detailed style sheet using macros is that styles can contain a ton of information. The object model used by Word (and accessible in VBA) quickly becomes quite complex when testing styles to see what they contain. Here's just a simple example to give you the flavor:
Sub SimpleStyleSheet() Dim s As Style Dim sOutput As String Dim sTemp As String Dim StyleTypes(4) As String StyleTypes(1) = "Paragraph" StyleTypes(2) = "Character" StyleTypes(3) = "Table" StyleTypes(4) = "List" For Each s In ActiveDocument.Styles sOutput = s.NameLocal & vbCrLf sOutput = sOutput & " Style type: " & StyleTypes(s.Type) & vbCrLf sTemp = s.BaseStyle If Len(sTemp) > 0 Then sOutput = sOutput & " Based on: " & s.BaseStyle & vbCrLf End If sOutput = sOutput & " Font: " & s.Font.Name sTemp = "" If s.Font.Bold Then sTemp = sTemp & "Bold, " If s.Font.Italic Then sTemp = sTemp & "Italic, " If Len(sTemp) > 0 Then sTemp = Left(sTemp, Len(sTemp) - 2) sOutput = sOutput & " (" & sTemp & ")" End If sOutput = sOutput & vbCrLf & vbCrLf Selection.TypeText (sOutput) Next s End Sub
The only thing this macro does is to list all the styles, what type of styles they are, whether they are based on a different style (and if so, what that style is named), what font is used by the style, and whether the font is bold or italic. Anyone familiar with styles will immediately understand that these few items are only a small sampling of what can be defined within a style. To check all possible style formats and print them in the style sheet would make the macro very long, indeed.
Even so, this macro might be useful as it provides an idea of how to put together your own style sheet. You just need to figure out what you want to see in the style sheet and then add the macro code to determine that information and print it out.
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13365) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Word here: Printing a Full Style Sheet.
Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!
If you use multiple printers, you may wonder how to set each document in Word to remember which printer to use for that ...
Discover MoreEver need to print the mirror image of your document? This tip explains how to reverse your image so it can be used for ...
Discover MoreMany modern printers include multiple paper trays that can be used for different types or colors of paper. Word allows ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments