Convert Manual Numbers to Custom Footnote Marks in Word with VBA
Question details
Convert manually typed footnote numbers into Word footnotes that use those numbers as custom marks.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- A document converted from a PDF contains footnote numbers as ordinary text, and the user wants to create actual Word footnotes.
- Observed behavior
- The desired result is a Word footnote with the original number as its custom mark and the footnote content supplied separately.
Identify each typed number and its corresponding footnote text. This example processes one selected marker at a time and requires a version of Word that supports VBA macros.
Create a Custom Footnote from a Selected Number with VBA
Use this macro when you can select a manual number and enter its corresponding footnote text.
Footnotes.Add uses the Reference argument for the custom mark and the Text argument for the footnote content. Capture the selected number before removing it.
This example does not find or remove existing footnote text automatically. Review any text left in the document after inserting the footnote.
In Word, open Developer > Visual Basic. If the Developer tab is hidden, enable it in Word's ribbon settings.
In the VBA editor, choose Insert > Module and paste: Sub ConvertSelectedMarker() Dim markerRange As Range Dim marker As String Dim noteText As String Set markerRange = Selection.Range.Duplicate marker = markerRange.Text If Len(marker) = 0 Then MsgBox "Select a manual footnote number first." Exit Sub End If noteText = InputBox("Enter the footnote text:") If Len(noteText) = 0 Then Exit Sub markerRange.Text = "" markerRange.Collapse Direction:=wdCollapseStart ActiveDocument.Footnotes.Add Range:=markerRange, Reference:=marker, Text:=noteText End Sub
Return to the document and select only the typed number in the main document body, without surrounding spaces. Open Developer > Macros, select ConvertSelectedMarker, and click Run.
Enter the corresponding footnote text in the prompt and click OK. Check the inserted mark and footnote, then repeat for the other manual numbers.

Work with Footnotes in WPS Writer
WPS Office is a free, lightweight Office alternative with a familiar interface and Microsoft Word format compatibility for an easier transition. WPS Writer supports document footnotes, although it does not fix or guarantee compatibility with Word-specific VBA macros.

Frequently Asked Questions
What does the Reference argument do in Footnotes.Add?
Reference supplies the custom footnote mark. Use the separate Text argument for the content that appears in the footnote.
Why must I capture the manual number before deleting it?
Deleting the selected text removes the number from the document. Store Selection.Range.Text in a string first so you can pass it to Reference.
Does the macro move existing footnote text automatically?
No. Enter the corresponding text in the prompt, then review and remove any original text that should no longer remain in the document.
Will Word automatically renumber these custom marks?
No. A custom mark preserves the supplied number rather than using Word's automatic footnote numbering.




