8

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?

1

3 Answers 3

3

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?

3

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
  • 1
    I just tested on Mac. Everything is OK. Thanks for the answer Mar 27, 2023 at 11:33
0

On Windows 11 / Microsoft Office 2021:

  1. Open the document
  2. Go to File > Options > Trust Center > Trust Center Settings > Privacy Options. Uncheck "Remove personal information from file properties on save," then click "OK."
  3. Open the Visual Basic Editor (Alt+F11) and double click on "This Document," in the Project panel, on the left.
  4. 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
  1. Run the script (F5).
  2. Confirm the comments' author names have been updated, then save the file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .