altering authorship of tracked changes in Word 2003

User jsmith has been making tracked changes on a Word doc on two different computers. Computer A did not have the user info set, and Computer B did, so half the changes show up as the generic "Author" and half show up as "jsmith".

I've fixed the user info on Computer A (tools > options > user info), but this is only good for new tracked changes going forward; it does not affect existing changes. So to Word, it still looks like there were two different people making the edits, and as a result, two different colors.

So here's the question: Is there a way to alter the underlying authorship of existing changes en masse? Maybe a VB script?

We'd prefer not to resort to (a) individually cutting/pasting (time-consuming), (b) using the Remove Private Data tool (I believe this anonomyzes everything to "Author"; we want "jsmith"), or (c) losing the "by author" color functionality for subsequent people who will edit the document?
pc3000Asked:
Who is Participating?
 
irudykCommented:
Try running the following code
Sub ChangeRevisionAuthorName()

Dim strOldAuthorName As String
strOldAuthorName = "Author"

Dim strNewAuthorName As String
strNewAuthorName = "jsmith"

Dim i As HTMLProjectItem

For Each i In ActiveDocument.HTMLProject.HTMLProjectItems
    i.Text = Replace(ActiveDocument.HTMLProject.HTMLProjectItems(1).Text, "cite=" & Chr(34) & "mailto:" & strOldAuthorName & Chr(34), "cite=" & Chr(34) & "mailto:" & strNewAuthorName & Chr(34), Compare:=vbTextCompare)
Next

ActiveDocument.HTMLProject.RefreshDocument

End Sub

Open in new window

0
 
redrumkevCommented:
0
 
pc3000Author Commented:
Ah, that's the most promising thing I've seen so far. I've tested it and it works, but the downside is that if the word "Author" (or whatever username I'm trying to replace) appears in the body of the text, it'll get replaced as well. I'm poring over the code to see what parts of the code I need to be looking at just to change the meta-data...hmm.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
pc3000Author Commented:
Perfect - thank you!
0
 
redrumkevCommented:
pc3000,

irudyk - jumped me on this one, my suggest was going to be that you only do a find/replace which more conditions.

I like the code provided... my idea would be the find/replace where you find a string such as:

mailto:author

replace with

mailto:jsmith

So if jsmith is in the article (not proceeded immediately by "mailto:"), then the find "is not going to find it" and thus leave "author" in place.

If it is a piece of text, such as J Smith, then a wildcard search *J Smith should work, because you would never have a letter right before J Smith

The card was sent byJ Smith. It would be... the card was sent by J Smith, thus *J Smith, should not find it.

Hopefully these solutions get you going in the right direciton.

On a side note, that link I sent you was something I didn't know about. I can't believe the break-down of the structure in the MS Script Editor, you can really do a lot via that window!!!

Kevin
0
 
pc3000Author Commented:
I'm already tweaking the code so that I can roll this out to other users...lots of people seem to have the problem. The only disappointing thing is that if you're running 2007 and 2003, you can't even get into MS Script Editor...so creating a VB script is the only way to go.

I think I've successfully been able to generalize the code with Application.Username instead of jsmith, that way it'll pull the current user info from Word's settings without having to customize the macro for each person.
0
 
pc3000Author Commented:
Arg, even the vb script won't work for my 2007 users... looks like MS got rid of the HTMLProject command altogether in 2007. Ah well, at least my 2003 users will be happy.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.