Skip to main content
 

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

Author: Siluvia Last Modified: 2024-08-29

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 window with a module inserted

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:

Do More in Less Time with AI-Enhanced Kutools for Word

Kutools for Word isn't just a set of tools - it's a smart solution designed to boost your productivity. With AI-driven capabilities and the most essential features, Kutools helps you accomplish more in less time:

  • Generate content that perfectly matches your needs.
  • Transform your writing with over 20 writing styles, ensuring it's flawless.
  • Summarize your document in a single click.
  • Translate your content into over 40 languages with ease, expanding your reach globally.
  • Receive instant help and information about your document.
  • Ask about document processing, and if Kutools has the tool, the AI Assistant will execute your task immediately at your command, putting the full power of Word at your fingertips.
  • Ask any question without leaving Word - seamlessly integrated, the AI Assistant is always within reach.
  • Generate, rewrite, summarize, and translate content with clicks.
  • Receive instant help and information about your document.
  • Ask about document processing, and the AI Assistant will present the right tool and execute the task, or guide you through the steps.
  • Ask any question without leaving Word - seamlessly integrated, the AI Assistant is always within reach.
Learn more about Kutools for Word Download Now
Kutools for Word features

Best Office Productivity Tools

Kutools for Word - Elevate Your Word Experience with Over 100 Remarkable Features!

🤖 Kutools AI Features: Generate Content / Rewrite Text / Document Q&A / Get Quick Answers / Translate documents / Polish Document (Preserve Format)...

📘 Document Mastery: Split Pages / Merge Documents / Export Selection in Various Formats (PDF/TXT/DOC/HTML...) / Batch Convert to PDF...

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 / Text Boxes / Hyperlinks / For more removing tools, head to the Remove group...

Creative Inserts: Insert Thousand Separators / Check Boxes / Radio Buttons / QR Code / Barcode / Multiple Pictures / Discover more in the Insert group...

🔍 Precision Selections: Pinpoint Specific Pages / Tables / Shapes / Heading Paragraphs / Enhance navigation with more Select features...

Star Enhancements: Navigate to Any Location / Auto-Insert Repetitive Text / Toggle Between Document Windows / 11 Conversion Tools...

Kutools and Kutools Plus tabs on the Word Ribbon
👉 Want to try these features? Download Kutools for Word now! 🚀
 

Best Office Productivity Tools

Kutools for Word - 100+ Tools for Word