Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, and 2013. 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: Putting Style Names Next to Paragraphs on a Printout.

Putting Style Names Next to Paragraphs on a Printout

by Allen Wyatt
(last updated November 22, 2014)

2

Steve notes that, in Draft view, if you set the "style area width" to something like an inch, you can see the style names beside each paragraph of text. This is very handy if you are editing using styles. Steve believes that it would be even handier if you could print the document in this view, so it included the style names beside each paragraph. He wonders if there is a way to do this.

There is no way to do this; unfortunately Word has never provided a way. It is possible to "fake" the data by putting your document text in the right column of a two-column table and typing the names of the styles in the left column, but that approach is not easy at all.

Another approach that seems half-way reasonable is to take a screen shot of your document and then edit the screen shot so that it doesn't include any extraneous information such as ribbons or other on-screen elements. You can then paste the screen shot into another document and print it. One advantage to using this approach is that you can "annotate" the screen shot so that it includes callouts explaining the use of the styles or instructions to the reader.

If you would like a more automated approach, you might try recording or developing a macro that accomplishes the following general steps:

  1. Record the style of each paragraph's style in the entire document.
  2. Change the paragraph formatting of all paragraphs to a style not in use.
  3. Turn on Track Changes.
  4. Go through each paragraph and set the paragraph's style back to the style recorded in step 1.
  5. Print the document with markup showing.
  6. Close the document without saving it.

While the style name won't appear at the left of the printout, as it does on-screen with the style area showing, it will show in the balloons at the right side of the document. (The balloons are put there by the Track Changes feature.)

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9688) applies to Microsoft Word 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Word here: Putting Style Names Next to Paragraphs on a Printout.

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

Adding a Comment to Multiple Cells

Adding a comment to a single cell is easy. What if you want to add the same comment to multiple cells, however? Here are ...

Discover More

Consolidating Changes under a Single User

When using Track Changes, you may want to have your edits appear to be those of a different user. Here's how to fool Word ...

Discover More

Displaying Quick Document Statistics

Need to see how many pages, words, paragraphs, or lines are in your document? Word makes it easy to retrieve such ...

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)

Automatically Update Document Styles Setting

Templates and styles are a great way to apply formatting consistently within and across documents. A couple of the ...

Discover More

Making Language Changes Apply to Text in Footnotes and Text Boxes

Word allows you to modify the language associated with the text in your document. How you modify the language can affect ...

Discover More

Reformatting a Document with Messed-Up Styles

If there are lots of hands that touch a document, there are lots of ways those hands can mess up the document. You may be ...

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}] 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 three more than 5?

2018-08-31 11:58:09

Robert C. Whitehead

Excerpted from Paul Beverly's excellent collection of Word macros "Computer Tools for Editors" (http://www.archivepub.co.uk/macros.html). This will prepend the name of each paragraph's style to the first line of the paragraph. Run it a second time to make the names go away. Play with it a few times before you make it part of your list of everyday macros.

Sub ShowStyles()
' Version 06.05.12
' Show style names as <A>-type codes in the text

'noShow = ",N,Normal,TOC 1,TOC 2,TOC 3,,,,"
'noShow = noShow & ",Table of Figures,P1,,,"

abbrvs = ",MTDisplayEquation,Disp,Heading 1,A,Heading 2,B,,,"
abbrvs = abbrvs & ",Heading 3,C,Heading 4,D,Normal,N,"

removePads = False

doTables = True
' Merged cells generate an error, so ignore it
' and carry on regardless!
If doTables = True Then On Error Resume Next

' Find return <|
Set rng = ActiveDocument.Content
With rng.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "<["
.Wrap = wdFindContinue
.Replacement.Text = ""
.Forward = True
.MatchWildcards = False
.Execute
End With

gotCode = rng.Find.Found
myTrack = ActiveDocument.TrackRevisions
ActiveDocument.TrackRevisions = False
'If the codes are there, remove them
If gotCode Then
Set rng = ActiveDocument.Content
With rng.Find
.Text = "\<\[*\]\>"
.Wrap = wdFindContinue
.Replacement.Text = ""
.Forward = True
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
Else
' If no codes then add codes
i = ActiveDocument.Paragraphs.Count
abbrvs = abbrvs & ","
For Each myPara In ActiveDocument.Paragraphs
thisStyle = myPara.Style
typeIt = True
If InStr(noShow, "," & thisStyle & ",") > 0 Then typeIt = False
If doTables = False And myPara.range.Information(wdWithInTable) = True Then typeIt = False
If typeIt = True Then
myPos = InStr(abbrvs, thisStyle)
If myPos > 0 Then
thisStyle = Mid(abbrvs, myPos + Len(thisStyle) + 1)
thisStyle = Left(thisStyle, InStr(thisStyle, ",") - 1)
End If
myPara.range.InsertBefore Text:="<[" & thisStyle & "]>"
End If
i = i - 1
StatusBar = "Paragraphs to go: " & Str(i)
Next myPara
End If

If removePads = True And gotCode = False Then
' Check whether the user wants to remove the pads
myResponse = MsgBox("Remove pad characters?", vbQuestion + vbYesNo)
If myResponse = vbYes Then
Set rng = ActiveDocument.Content
With rng.Find
.Text = "<["
.Wrap = wdFindContinue
.Replacement.Text = "<"
.Forward = True
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With rng.Find
.Text = "]>"
.Wrap = wdFindContinue
.Replacement.Text = ">"
.Forward = True
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
End If
End If
StatusBar = ""
ActiveDocument.TrackRevisions = myTrack
End Sub


2015-08-17 16:57:35

Erica

Do you know if anyone has tried this technique with success?

I am trying it now and Word doesn't display the tracked formatting change for every paragraph. I am sure that the process of "record style, change to a placeholder style, turn tracking on, change back to original style" is happening because I set it up to do the whole process for each paragraph individually and I can see it happen as I step through the code. But when I reapply the original style, the style name doesn't always appear.


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.

Newest Tips
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.