Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to convert comments to footnotes or endnotes in Microsoft Word?

Supposing there are multiple comments in your Word document, how can you convert all these comments to footnotes or endnotes at the same time? This article provides VBA methods to achieve it.

Convert comments to footnotes or endnotes with VBA code


Convert comments to footnotes or endnotes with VBA code

The below VBA codes can help you quickly convert all comments in current document to footnotes or endnotes. Please do as follows.

1. Open the document contains comments you will convert to footnotes or endnotes, press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.

2. In the Microsoft Visual Basic for Applications window, click Insert > Module. Then copy below VBA code into the Module window.

VBA code: Convert comments to footnotes:

Sub ConvertCommentsToFootnotes()
    Dim xComm As Comment
    Dim xCommRange As Range
    Dim xDoc As Document
    Application.ScreenUpdating = False
    Set xDoc = ActiveDocument
    For Each xComm In xDoc.Comments
        Set xCommRange = xComm.Range
        xDoc.Footnotes.Add xComm.Scope, , xCommRange.Text
        xComm.Delete
    Next
    Application.ScreenUpdating = True
End Sub

VBA code: Convert comments to endnotes:

Sub ConvertCommentsToEndnotes()
    Dim xComm As Comment
    Dim xCommRange As Range
    Dim xDoc As Document
    Application.ScreenUpdating = False
    Set xDoc = ActiveDocument
    For Each xComm In xDoc.Comments
        Set xCommRange = xComm.Range
        xDoc.Endnotes.Add xComm.Scope, , xCommRange.Text
        xComm.Delete
    Next
    Application.ScreenUpdating = True
End Sub

3. Press the F5 key to run the code.

Then all comments in current document are converted to footnotes or endnotes immediately based on the VBA code you applied.


Related articles:

Recommended Productivity Tools

shot kutools word kutools tab 1180x121
shot kutools word kutools plus tab 1180x120
 

Kutools For Word - More Than 100 Advanced Features For Microsoft Word, Save Your 60% Time

  • Complicated and repeated operations can be done a one-time processing in seconds.
  • Insert multiple images across folders into Word document at once.
  • Merge and combine multiple Word files across folders in to one with your desired order.
  • Split the current document into separate documents according to heading 1, section break or other criteria.
  • Convert files between Doc and Docx, Docx and PDF, collection of tools for common conversions and selection, and so on...
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.