![]() |
Excel and Office
RAQ Importing comments from Excel into Word mail merge |
Q: Can it be done: importing comments from an Excel spreadsheet into word? A: Yes, it can. I've written a little macro to make the merge easier for you:
Sub ListComments() Set NewSheet = Sheets.Add NewSheet.Move before:=Sheets(1) NewSheet.Range("A1").Select With Selection .Value = "SHEET" .Offset(0, 1) = "COMMENT" .Offset(1, 0).Select End With For Each sh In Sheets For Each comm In sh.Comments Selection.Value = sh.Name Selection.Offset(0, 1).Value = comm.Text Selection.Offset(1, 0).Select Next comm Next sh End Sub
This creates a new sheet at the front of the workbook (useful if you're merging into Word 2000 or earlier!) with a merge table you can simply use as the datasource in your Word document.
|
|