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:
- How to add new page or text after endnotes in a Word document?
- How to select all footnotes in a Word document?
Best Office Productivity Tools
Kutools for Word - Elevate Your Word Experience with Over 100 Remarkable Features!
Dive into the highlighted features below or click here to explore the full power of Kutools for Word.
📘 Document Mastery: Split Pages / Merge Documents / Export Selection in Various Formats (PDF/TXT/DOC/XLSX) / Batch Convert to PDF / Export Pages as Images / Print Multiple Files at once ...
✏ Contents Editing: Batch Find and Replace across Multiple Files / Resize All Pictures / Transpose Table Rows and Columns / Convert Table to Text ...
🧹 Effortless Clean: Sweap away Extra Spaces / Section Breaks / All Headers / Text Boxes / Hyperlinks / For more removing tools, head to our Remove Group
➕ Creative Inserts: Insert Thousand Separators / Check Boxes / Radio Buttons / QR Code / Barcode / Diagonal Line Table / Equation Caption / Image Caption / Table Caption / Multiple Pictures / Discover more in our Insert Group
🔍 Precision Selections: Pinpoint specific pages / tables / shapes / heading paragraphs / Navigate with ease using our Select Group
⭐ Star Enhancements: Navigate swiftly to any location / auto-insert repetitive text / seamlessly toggle between document windows / 11 Conversion Tools ...
Transform your Word tasks with Kutools. 👉 Download with 30-day trial Now 🚀.
