Renaming Custom Styles to Be Built-In Styles

Written by Allen Wyatt (last updated January 31, 2026)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365


BJ has a template with custom heading styles that are perfect for his users' needs. The names for the heading styles are A-Heading 1, A-Heading 2, etc. BJ would like to rename the custom heading styles to have the usual heading style names (Heading 1, Heading 2, etc.), but Word won't allow that because those are reserved names.

The described behavior is correct—Word won't allow you to rename a style so that it has the same name as a built-in style. This is not necessarily because it is a built-in style, but because it is an existing style. For instance, if BJ tried to rename A-Heading 1 as A-Heading 2, and A-Heading 2 already existed, then Word would balk at the attempt. In that case, it would be possible to delete A-Heading 2 and then do the rename, an operation that should work fine. The problem in what BJ is wanting to do, though, is that you cannot delete Heading 1 before you try to rename another style as Heading 1. Word does not allow you to delete built-in styles.

The only solution to this issue is to change the style definition of Heading 1 so that it matches the style definition of A-Heading 1. This process can be quite painstaking, particularly if you need to do it with many heading styles. You could try a macro-based approach to do most of the copying. The following macro provides an example of how you could approach the task:

Sub CopyStyleDef()
    Dim doc As Document
    Dim stSrc As Style
    Dim stDst As Style

    Set doc = ActiveDocument
    On Error GoTo ErrHandler

    Set stSrc = doc.Styles("A-Heading 1")
    Set stDst = doc.Styles("Heading 1")

    ' The destination style, which MUST be a heading style, will be
    ' either a paragraph or linked type. Need to make sure that the
    ' source style (the one being copied) is paragraph or linked.
    ' If it is not, then the macro fails.

    If Not (stSrc.Type = wdStyleTypeParagraph _
      Or stSrc.Type = wdStyleTypeLinked) Then
        Err.Raise vbObjectError + 1001, , stSrc.NameLocal & _
          " must be a paragraph or linked style."
    End If

    ' Copy formatting
    stDst.ParagraphFormat = stSrc.ParagraphFormat
    stDst.Font = stSrc.Font
    CopyTabStops stSrc, stDst    ' Copy tabs

    On Error Resume Next
    stDst.ParagraphFormat.OutlineLevel = stSrc.ParagraphFormat.OutlineLevel
    On Error GoTo ErrHandler

    ' Copy style-level properties, if they exist
    On Error Resume Next
    stDst.NoProofing = stSrc.NoProofing
    stDst.LanguageID = stSrc.LanguageID
    stDst.LanguageIDFarEast = stSrc.LanguageIDFarEast
    stDst.AutomaticallyUpdate = stSrc.AutomaticallyUpdate

    If Not stSrc.NextParagraphStyle Is Nothing Then
        Set stDst.NextParagraphStyle = stSrc.NextParagraphStyle
    End If

    If Not stSrc.BaseStyle Is Nothing Then
        Set stDst.BaseStyle = stSrc.BaseStyle
    End If
    On Error GoTo ErrHandler

    ' Reassign any paragraphs using source style to destination
    ' style, then delete the source style. Deletion will fail if
    ' source style is still used anywhere in the document.
    ReassignStyles doc, stSrc, stDst
'   stSrc.Delete
    Exit Sub

ErrHandler:
    MsgBox "Could not complete operation:" & vbCrLf & _
      "Error " & Err.Number & ": " & Err.Description, _
      vbExclamation, "Copy Style Def"
End Sub
Private Sub CopyTabStops(ByVal stSrc As Style, ByVal stDst As Style)
    Dim ts As TabStop

    ' Start by clearing any existing tab stops
    On Error Resume Next
    stDst.ParagraphFormat.TabStops.ClearAll
    On Error GoTo 0

    For Each ts In stSrc.ParagraphFormat.TabStops
        stDst.ParagraphFormat.TabStops.Add _
          Position:=ts.Position, Alignment:=ts.Alignment, _
          Leader:=ts.Leader
    Next ts
End Sub
Private Sub ReassignStyles(ByVal doc As Document, _
  ByVal stFrom As Style, ByVal stTo As Style)
    Dim sr As Range
    Dim r As Range

    For Each sr In doc.StoryRanges
        Set r = sr
        Do
            With r.Find
                .ClearFormatting
                .Replacement.ClearFormatting
                .Text = ""
                .Replacement.Text = ""
                .Format = True
                .Style = stFrom
                .Replacement.Style = stTo
                .Wrap = wdFindContinue
                .Execute Replace:=wdReplaceAll
            End With
            Set r = r.NextStoryRange
        Loop Until r Is Nothing
    Next sr
End Sub

The macro is quite long because there are many elements that go into a style definition. This macro copies paragraph formatting, font formatting, and tab stops. It does not copy borders or shading, which can be quite a bit more complex. It also copies most of the possible style-level properties. The ReassignStyles procedure is then used to go through all the stories in the document and reassign any paragraphs using A-Heading 1 to use, instead, Heading 1.

Finally, the A-Heading 1 style is deleted. Notice, though, that this line has been commented out in the macro. You should only delete the style (by removing the apostrophe) if you know that your style doesn't utilize any borders or shading, if it isn't used in any multilevel lists, and if no other styles are based on the A-Heading 1 style.

You can use this macro on other styles by changing these lines, which appear near the beginning of the macro:

    Set stSrc = doc.Styles("A-Heading 1")
    Set stDst = doc.Styles("Heading 1")

Just change them to reflect the correct names of the source and destination styles.

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 (3433) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, 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

Creating New Windows

A great way to work on different parts of the same document at the same time is to create windows. These function as ...

Discover More

Speeding Up Document Display

Are your documents displaying too slowly? You can configure Word so that it is as quick as possible on displaying by ...

Discover More

Pasting HTML without Hyperlinks

Excel allows you to copy information from the web and paste it into a worksheet. Problem is, the pasting could take some ...

Discover More

Discover the Power of Microsoft Office This beginner-friendly guide reveals the expert tips and strategies you need to skyrocket your productivity and use Office 365 like a pro. Mastering software like Word, Excel, and PowerPoint is essential to be more efficient and advance your career. Simple lessons guide you through every step, providing the knowledge you need to get started. Check out Microsoft Office 365 For Beginners today!

More WordTips (ribbon)

Putting Style Names Next to Paragraphs on a Printout

If you use styles to format your document, you might want a way to print the document and show, to the left of each ...

Discover More

Preventing Changes to Styles in Documents

Have you ever created a template only to have the styles within it changed as they were used within a document? Here are ...

Discover More

Quickly Copying Styles

You can easily use regular editing techniques to copy styles from one document to another. Here's how to make quick work ...

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 one less than 1?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


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.