Changing Comment Author

  • Thread starter Thread starter slimjim009
  • Start date Start date
S

slimjim009

HI, I've got a document with lots of comments published by a colelague, but I
want to chenge it from his author identity to one that says 'Admin'. How do
you do this in Word 2007 please?
 
slimjim009 said:
HI, I've got a document with lots of comments published by a
colelague, but I want to chenge it from his author identity to one
that says 'Admin'. How do you do this in Word 2007 please?

Use this macro (see http://www.gmayor.com/installing_macro.htm if needed).
It isn't specific to Word 2007, but should work in any version from Word 97
onward.

Sub ChangeCommentAuthor()
Dim sOrigAuthInit As String
Dim sNewAuth As String
Dim sNewAuthInit
Dim oCom As Comment
Dim nChg As Long

sOrigAuthInit = _
InputBox("Enter initials of author to replace:")
If Len(sOrigAuthInit) = 0 Then Exit Sub

sNewAuth = InputBox("Enter replacement author name:")
If Len(sNewAuth) = 0 Then Exit Sub

sNewAuthInit = InputBox("Enter replacement author initials:")

For Each oCom In ActiveDocument.Comments
With oCom
If LCase(sOrigAuthInit) = LCase(.Initial) Then
.Author = sNewAuth
.Initial = sNewAuthInit
nChg = nChg + 1
End If
End With
Next

MsgBox "Updated " & nChg & " comments"
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top