Skip to content

Instantly share code, notes, and snippets.

@pa-0
Forked from wyfinger/CommentsAuthor.bas
Created May 22, 2025 01:09
Show Gist options
  • Save pa-0/248489d7fd003a81f57410a41465f878 to your computer and use it in GitHub Desktop.
Save pa-0/248489d7fd003a81f57410a41465f878 to your computer and use it in GitHub Desktop.
Edit comments author at selection in Word
Sub EditComment()
If ActiveDocument.Comments.Count = 0 Then Exit Sub
For i = 1 To ActiveDocument.Comments.Count
If (Selection.Start >= ActiveDocument.Comments(i).Scope.Start) And _
(Selection.Start <= ActiveDocument.Comments(i).Scope.End) Then
ActiveDocument.Comments(i).Author = InputBox(ActiveDocument.Comments(i).Author _
& vbCrLf & vbCrLf & ActiveDocument.Comments(i).Range.Text, "Author", ActiveDocument.Comments(i).Author)
End If
Next
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment