Document Editing Problems

How to Remove Spaces Before Footnote Numbers in Microsoft Word

Bushra ParveenBushra Parveen Nov 3, 2026 868 views

Question details

The user needs to remove unwanted spaces immediately preceding superscript footnote references in a Word document, particularly when standard Find and Replace wildcard searches cannot locate them.

How to Remove Spaces Before Footnote Numbers in Microsoft Word
Product
Microsoft Word
Device & OS
not provided
Scenario
Cleaning up the formatting of a document downloaded from an external database before formal submission.
Observed behavior
A regular space appears before superscript footnote numbers, and built-in wildcard searches fail to isolate and remove these specific spaces.
Before you start

Always create a backup copy of your document before running any VBA macros to prevent accidental data loss or irreversible formatting changes.

Solution 1Recommended

Use a VBA Macro to Target Footnote References

Since the standard Find and Replace tool struggles to isolate spaces specifically tied to footnote references, a VBA macro is the most effective way to target and delete them automatically.

This approach uses a macro that scans the document for text formatted with the 'Footnote Reference' style. It checks the character immediately preceding the footnote; if it is a regular space, the macro deletes it.

1
Open the VBA Editor

Open your document in Microsoft Word and press 'Alt + F11' on your keyboard to launch the Visual Basic for Applications (VBA) editor.

2
Insert a New Module

In the top menu of the VBA editor, click 'Insert' and select 'Module' to create a new blank code window.

3
Input the Macro Code

Paste a VBA script designed to loop through all text with the 'Footnote Reference' style, check the preceding character for a regular space (ASCII 32), and delete it.

4
Run the Macro

Close the VBA editor to return to your document. Press 'Alt + F8', select the macro you just created, and click 'Run' to remove the spaces.

Use a VBA Macro to Target Footnote References
Verify Footnote Styles: Ensure your footnotes actually use the default 'Footnote Reference' style, otherwise the macro will not be able to locate them during its scan.
Free Microsoft Office alternative

Format Professional Documents Seamlessly with WPS Office

If you frequently encounter frustrating formatting restrictions or need a lighter, faster application for editing complex documents, WPS Office is an excellent choice. It provides a robust word processing environment that easily manages complex footnotes, citations, and professional formatting without the heavy resource footprint.

  1. 1. Download and Install: Visit the official WPS website to download and install WPS Office for free.
  2. 2. Open Your Document: Launch WPS Writer and open your .docx file containing the footnotes.
  3. 3. Edit Seamlessly: Use the familiar interface to adjust your footnote formatting or utilize the built-in Find and Replace tools.
Fully compatible with Microsoft Word (.docx) formats, ensuring your footnotes and legal citations stay completely intact.Free and lightweight alternative to bulky Microsoft Office installations.Intuitive user interface that makes finding and adjusting document formatting straightforward.Cross-platform support allows you to edit and review documents on Windows, Mac, Linux, and mobile devices.
microsoft office alternative - wps office

Frequently Asked Questions

Why can't I find spaces before footnotes using normal Find and Replace?

In Microsoft Word, superscript footnote references are treated as special characters rather than standard text. Normal wildcard searches often fail to isolate the boundary between regular text spaces and these special reference marks.

Can I remove these spaces manually without a macro?

Yes, you can manually place your cursor before each footnote number and press the Backspace key. However, for long documents with hundreds of footnotes, a macro saves a significant amount of time and prevents human error.

Why do documents downloaded from databases have unwanted spaces?

Documents exported from external databases or web platforms often contain automated formatting artifacts. During the HTML-to-Word conversion process, extra spaces or non-breaking spaces are sometimes mistakenly inserted right before the footnote tags.