How To Change Name In Comments Word
Let's say you've got a document with tracked changes in it, and the reviewer changes and comments are supposed to be by a corporate name — say XYZ Editing (apologies if this business exists) but they have been put in as by Fred Smith, an employee of XYZ.
How do you change them?
Changing the author of comments is pretty straightforward.
Try the method at:
https://www.datanumen.com/blogs/4-ways-delete-change-author-names-comments-word-document/
This uses a VBA script.
Press "Alt+F11" to open VBA editor. Paste the code and click 'run'.
Here is the suggested VBA code:
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
So, this changesall comments to be by XYZ. It's no good if you want to change only some.
Now, for the tracked changes, there seems to be no simple solution. The best advice I saw was at https://stackoverflow.com/questions/38225918/vba-to-change-name-of-author-on-tracked-changes-in-word, but none of it is really simple.
But, let's say I want to change every occurrence of Fred Smith to XYZ. The procedure below seems to work. ( NOTE!!!! Your mileage may vary, I am not responsible for any butchering of your documents! Make backups! Caveat emptor. No promises, no liability etc.)
- Make a backup. Say copy document.docx to document-mod.docx
- Open the document in Word
- Save it as Word XML Document (*.xml)
- Open document-mod.xml in a text editor, or if in Word be sure to edit it as plain text
- Do a global search and replace for Fred Smith replaced by XYZ. (Ditto for any other names that need changing.)
- Save
- Open document-mod.xml in Word and save as document-mod.docx
- Check that nothing's gone funny, maybe using document compare tools and some spot checks
Note that this will also change any appearances of Fred Smith in comments, and possibly in the body text (though I think the body text is encoded, so should be ok), so do do a few checks.
I used Vim as my editor, so my Vim command was just:
:%s/Fred Smith/XYZ/g
and all were changed.
Note also that this will not change reviewer initials, so it is better to do the comments change first using the VBA script, then do this to change the tracks.
Here's a screenshot to add variety to this posting:
This is what a file might look like in Vim:
Best of luck!
How To Change Name In Comments Word
Source: https://darrengoossens.wordpress.com/2019/12/18/change-name-of-author-of-existing-comments-in-word-track-changes/
Posted by: bennettmonery.blogspot.com

0 Response to "How To Change Name In Comments Word"
Post a Comment