
是否可以更改或隱藏文件評論的作者姓名?我有數百份文檔,其中寫了幾十條評論,現在我的老闆要我將評論者姓名從我更改為他。這是可能的還是我必須像他一樣手動複製貼上所有評論?
答案1
刪除(而不是更改)用戶名遵循本指南
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.
否則這個問題的答案將需要大量的手動工作:如何更改Word中審查者的姓名?
答案2
由於 Word for Mac 2011 支援巨集,您應該能夠透過將所有文件放在一個資料夾中並執行下面的程式碼來自動執行此操作。
將 vDirectory 變更為包含要修改的文件的資料夾的路徑。 sAuthorName 變數應包含替換名稱。所需功能GetFilesOnMac 帶或不帶子資料夾可以在網路上找到這裡。
免責聲明:該巨集尚未在 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
答案3
在 Windows 11/Microsoft Office 2021 上:
- 開啟文件
- 前往檔案 > 選項 > 信任中心 > 信任中心設定 > 隱私權選項。取消選取“儲存時從檔案屬性中刪除個人資訊”,然後按一下“確定”。
- 開啟 Visual Basic 編輯器 (Alt+F11),然後雙擊左側「專案」面板中的「此文件」。
- 將以下程式碼貼到腳本編輯器中:
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
- 運行腳本 (F5)。
- 確認評論的作者姓名已更新,然後儲存文件。