VBA & Macro Problems

Change All Footnote and Endnote Reference Styles in Word

Khadija KhanKhadija Khan Nov 20, 2026 869 views

Question details

Apply separate Footnote Reference and Endnote Reference styles to all note references in a long Word document.

Change All Footnote and Endnote Reference Styles in Word
Product
Microsoft Word
Device & OS
not provided
Scenario
A document contains hundreds of footnotes and endnotes that need consistent reference formatting.
Observed behavior
The reference formatting keeps reverting to Normal.
Before you start

Open the document in desktop Word and check that editing is allowed. Review the macro before running it, and enable macros only if you trust the code.

Solution 1Recommended

Apply Both Reference Styles with a Word VBA Macro

Use this macro to update the reference marks in the main document in one pass.

The macro clears direct font formatting from each reference mark before applying the appropriate built-in character style. It does not change the formatting of the footnote or endnote text.

1
Open the VBA editor

In desktop Word, open the target document. On Windows, press Alt+F11; on Mac, open Tools > Macro > Visual Basic Editor.

2
Insert a module

In the VBA editor, select the target document or Normal in the Project pane, then choose Insert > Module.

3
Paste the macro

Paste this code into the module: Sub ApplyNoteReferenceStyles() Dim doc As Document Dim fn As Footnote Dim en As Endnote Set doc = ActiveDocument For Each fn In doc.Footnotes fn.Reference.Font.Reset fn.Reference.Style = wdStyleFootnoteReference Next fn For Each en In doc.Endnotes en.Reference.Font.Reset en.Reference.Style = wdStyleEndnoteReference Next en End Sub

4
Run the macro

Return to Word and make the target document active. Open View > Macros or Tools > Macro > Macros, select ApplyNoteReferenceStyles, and choose Run.

5
Check and save

Inspect several footnote and endnote references, then save the document. If you stored the macro in the document and want to retain it, use File > Save As and choose a macro-enabled Word document (.docm).

Apply Both Reference Styles with a Word VBA Macro
Direct formatting is removed: The Font.Reset command removes manually applied font formatting from the reference marks. Their appearance then follows the corresponding reference style.
Free Microsoft Office alternative

Work with Word Documents in WPS Writer

WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Word documents. Its format compatibility helps you move existing files into WPS Writer, though it does not fix a Microsoft Word macro or guarantee VBA compatibility.

Open and edit documents containing footnotes and endnotes.Compatible with Microsoft Word formats, including DOC and DOCX.Use a familiar interface to transition from Word.Work with documents in a free, lightweight office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Does the macro change the text inside footnotes and endnotes?

No. It applies styles to the reference marks in the document, not to the note text. To change note text formatting, modify the Footnote Text or Endnote Text style in Word's Styles pane.

Why do reference marks still look different after the macro runs?

The Footnote Reference and Endnote Reference styles may have different settings than you expect. Open the Styles pane, find each style, and choose Modify to review its font formatting.

Do I need to save the document as a DOCM file?

Use File > Save As and choose DOCM if the macro is stored in the document and you want to keep it there. If the macro is stored in the Normal template, the edited document can be saved as DOCX.

What should I do if Word blocks the macro?

Check Word's macro security settings and the document's trust status. Enable the macro only after reviewing the code and confirming that you trust it.