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 export comments from Excel to Word?

For Excel users, inserting comments into the cells is a common task, sometimes, you need to copy and paste these comments to a Word document for some purpose. Of course, you can copy and paste the comment to the Word one by one, but this is a tedious and time-consuming job. Is there any way to export all the comments from Excel to Word at once?

Export comments from current worksheet to Word with VBA code

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

arrow blue right bubbleExport comments from current worksheet to Word with VBA code


Unfortunately, Excel doesn’t provide the feature to copy and paste all the comments to Word at once. However, with the following VBA code, you can quickly export all comments of active worksheet to the Word document.

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: Export comments from current worksheet to Word

Sub CopyCommentsToWord()
'Update 20140325
Dim xComment As Comment
Dim wApp As Object
On Error Resume Next
Set wApp = GetObject(, "Word.Application")
If Err.Number <> 0 Then
  Err.Clear
  Set wApp = CreateObject("Word.Application")
End If
wApp.Visible = True
wApp.Documents.Add DocumentType:=0
For Each xComment In Application.ActiveSheet.Comments
    wApp.Selection.TypeText xComment.Parent.Address & vbTab & xComment.Text
    wApp.Selection.TypeParagraph
Next
Set wApp = Nothing
End Sub

3. Then press F5 key to run this code, and all of the comments in the active worksheet have been exported to a new Word document with itscell address. See screenshot:

doc-export-comments1


Related articles:

How to quickly insert a comment to multiple cells in Excel?

How to change the shape of comment box in Excel?

How to change all comment formats in cells in Excel?

How to change all comments’ author name in Excel?


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
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.
  • To post as a guest, your comment is unpublished.
    Sierra · 7 months ago
    I copied and pasted exactly but it only generated a blank word document. Any ideas?


    Sub CopyCommentsToWord()
    'Update 20140325
    Dim xComment As Comment
    Dim wApp As Object
    On Error Resume Next
    Set wApp = GetObject(, "Word.Application")
    If Err.Number <> 0 Then
    Err.Clear
    Set wApp = CreateObject("Word.Application")
    End If
    wApp.Visible = True
    wApp.Documents.Add DocumentType:=0
    For Each xComment In Application.ActiveSheet.Comments
    wApp.Selection.TypeText xComment.Parent.Address & vbTab & xComment.Text
    wApp.Selection.TypeParagraph
    Next
    Set wApp = Nothing
    End Sub
    • To post as a guest, your comment is unpublished.
      Dario · 3 months ago
      same issue. did you manage to solve?
  • To post as a guest, your comment is unpublished.
    Sam · 9 months ago
    This is super helpful! Thanks!
    Is there a way to pull in the row or column header rather than the cell position (B4)?
    • To post as a guest, your comment is unpublished.
      Evaristo · 6 months ago
      I was able to get this result by changing the "xComment.Parent.Address" to "xComment.Parent.Value" in row 14.
  • To post as a guest, your comment is unpublished.
    Jay Ray · 1 years ago
    omg! it was really helpful!
  • To post as a guest, your comment is unpublished.
    Darrell · 2 years ago
    This is great and helps! Is there a way to get actual text within the cell to replace the cell number or to be included? I have headers and balloon instructions in the headers. I am trying to create a word procedure on filling out the rows with headers of the data (Ex.; "Name") and then the comment box tells the user the format.

    Currently Shows with above macro:

    A1 Username:


    - Enter Name of Borrower as seen on Borrower organizational documents or other name supporting documents.


    Looking for it so show the text of cell A1 which is Company Name.


    Any help greatly appreciated!
  • To post as a guest, your comment is unpublished.
    Bartolomeu · 2 years ago
    Can it be done to extract from filtred rows after applying filter ?
    Thank you.
  • To post as a guest, your comment is unpublished.
    peod · 3 years ago
    it really helped. tq!
  • To post as a guest, your comment is unpublished.
    david · 3 years ago
    does anyone know if I can do this but only copying comments from a specific row?

    any help will be much appreciated ive been trying to work on this for ages.
  • To post as a guest, your comment is unpublished.
    randi · 3 years ago
    get the message "Compile error: Invalid outside procedure". Now what?
    • To post as a guest, your comment is unpublished.
      Kate · 2 years ago
      I had the same message - did you manage to resolve this Randi?
  • To post as a guest, your comment is unpublished.
    Gillian · 3 years ago
    This worked perfectly and was exactly what I needed! Thank you so much.
  • To post as a guest, your comment is unpublished.
    vladmir · 4 years ago
    hi,

    Excellent article, I was curious to know, if I have images in those comments, will that VBA code above also quickly export all images in the comments that images of an active worksheet to the Word document?

    Thank you for taking the time to read this, much appreciated.

    Regards,

    Vladmir