Is it possible to change or hide the name of the author of comments on a document? I have hundreds of documents where I have written dozens of comments, now my boss wants me to change the commenter name from me to him. Is this possible or do I have to copy paste all comments manually as him?
3 Answers
To remove (not change) the username follow this guide
On the Word menu, click Preferences.
Under Personal Settings, click Security.
Under Privacy options, select the Remove personal information from this file on save check box.
Save the document.
otherwise this question has an answer which would take a lot of manual work: How to change the name of a reviewer in Word?
Since Word for Mac 2011 supports macros you should be able to automate this by placing all your documents in one folder and running the code below.
Change vDirectory to the path of the folder which contains the documents to modify. The sAuthorName variable should contain the replacment name. The required function GetFilesOnMacWithOrWithoutSubfolders can be found online here.
Disclamer: This macro has not been tested on a MAC
Sub ChangeAuthorInDocumentComments ()
Dim vDirectory As String
Dim sAuthorName As String
Dim oDoc As Document
vDirectory = "C:\Docs\"
sAuthorName = "Adam"
MyFiles = ""
Call GetFilesOnMacWithOrWithoutSubfolders(Level:=1, ExtChoice:=7, FileFilterOption:=3, FileNameFilterStr:=".doc")
Application.ScreenUpdating = False
If MyFiles <> "" Then
MySplit = Split(MyFiles, Chr(10))
For FileInMyFiles = LBound(MySplit) To UBound(MySplit) - 1
Set oDoc = Documents.Open(MySplit(FileInMyFiles))
For Each Ocom In ActiveDocument.Comments
With Ocom
Ocom.Author = sAuthorName
End With
Next
oDoc.Close SaveChanges:=True
Next FileInMyFiles
End If
Application.ScreenUpdating = True
End Sub
-
1
On Windows 11 / Microsoft Office 2021:
- Open the document
- Go to File > Options > Trust Center > Trust Center Settings > Privacy Options. Uncheck "Remove personal information from file properties on save," then click "OK."
- Open the Visual Basic Editor (Alt+F11) and double click on "This Document," in the Project panel, on the left.
- Paste the following code into the script editor:
Sub ChangeAllAuthorNamesInComments()
Dim objComment As Comment
' Change all author names in comments
For Each objComment In ActiveDocument.Comments
objComment.Author = "XYZ"
objComment.Initial = "X"
Next objComment
End Sub
- Run the script (F5).
- Confirm the comments' author names have been updated, then save the file.