MS Word Kommentare

Aus Thomas Wiki
Zur Navigation springen Zur Suche springen

Extrahieren aller Kommentare in ein CSV-File mit den Informationen:

Seite, Zeile, Spalte, Author, kommentierter Text, Kommentar Text

Sub MitPruefung()
  Open "D:\MP.csv" For Output As #1
 
  For Each listComment In ActiveDocument.Comments
 
    With listComment
      Print #1, _
        .Scope.Information(wdActiveEndPageNumber); _
        "; Ze/Sp = "; .Scope.Information(wdFirstCharacterLineNumber); _
        "/"; .Scope.Information(wdFirstCharacterColumnNumber); _
        ";"; .Author; _
        ";"; .Scope.Text _
        ";"; .Range.Text;
    End With
  
  Next listComment
  Close #1
 
End Sub