Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Selectively Removing "Edited By" Reference

Posted on 2004-04-20
6
Medium Priority
?
276 Views
Last Modified: 2012-06-21
Hello Word Pros...

I have a customer who needs the ability to selectively turn off the little bubble that tells people who made changes to a document when in Track Revisions mode. I believe he is on Office 2000.

The deal is, he regularly edits documents on behalf of his clients, but the clients turn around and want to be able to show the revisions to their upwind's, but take credit for them. I'm looking for something a little more creative than "take his name out of the user section in tools/options".

Comments, suggestions?

Thanks in advance.
0
Comment
Question by:GearyTech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 10877668
Well, the first and easiest way is to use Word's Compare Documents feature and then no one gets credit for revisions.  It simply shows the revisions.

0
 
LVL 7

Accepted Solution

by:
rosesolutions1 earned 2000 total points
ID: 10879009
Here is some code that will have this effect - tested in Word2003 only, so up to you to see if OK in your version. I've only implemented insertiions and deletions for you - don't know if you need any more. [FWIW, this stuff is undocumented even in Word2003, and the macro recorder doesn't record any of these commands.  The stuff is in the help system/object browser, but its darn hard to find!]

1. You need to change the string <PUT THE AUTHOR NAME HERE> with whatever the name etc of the person you want to strip out are. After the code is run,. the changes will have been made by the current user...
2. Connect to a button, and you are done...


Sub ReplaceRevisions()
Dim intMode As Integer
intMode = ActiveWindow.View.RevisionsMode 'remember current mode so we can restore it at the end
ActiveWindow.View.RevisionsMode = wdInLineRevisions 'operate without the balloons confusing things
Dim rvsn As Revision
ActiveDocument.TrackRevisions = True

Dim x As Integer
For x = ActiveDocument.Revisions.Count To 1 Step -1 'for each can endless loop because we are creating new revisions inside the loop...
    Set rvsn = ActiveDocument.Revisions(x)
    If rvsn.Author = "<PUT THE AUTHOR NAME HERE>" Then
        Select Case rvsn.Type
            Case wdNoRevision
            Case wdRevisionDelete
                rvsn.Range.Select
                'if it was a deletion, reject the change, which leaves the deletion highlighted
                rvsn.Reject
                'and then delete it again
                Selection.Delete
            Case wdRevisionInsert
                rvsn.Range.Select
                'cut it out - which automatically cancels the revision stuff
                Selection.Cut
                'and paste it back
                Selection.PasteAndFormat (wdPasteDefault)
            Case wdRevisionParagraphProperty
            Case wdRevisionReconcile
            Case wdRevisionSectionProperty
            Case wdRevisionStyleDefinition
            Case wdRevisionConflict
            Case wdRevisionDisplayField
            Case wdRevisionParagraphNumber
            Case wdRevisionProperty
            Case wdRevisionReplace
            Case wdRevisionStyle
            Case wdRevisionTableProperty
            Case Else
                MsgBox "huh?"
        End Select
    End If
Next

Set rvsn = Nothing
ActiveWindow.View.RevisionsMode = intMode 'back the way it was
End Sub
0
 
LVL 4

Author Comment

by:GearyTech
ID: 10880167
Rosesolutions1 - thank you... will test this code tonight and get back to you...
0
New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

 
LVL 4

Author Comment

by:GearyTech
ID: 10924305
Rosesolutions - Ok, it kind of works... but when I run the code it strikes out the original revision and enters another revision with the new revisor's name ... any way to avoid ? I tried this with Word 2002.

Also, since this customer may need to change the original revisor and specify the desired revisor, I need to pop up inputboxes to prompt for both. I've figured out the original revisor part... but not the desired revisor part (per below), any suggestions?

Sub Change_Author()
'
' Change_Author Macro
'

Dim intMode As Integer
intMode = ActiveWindow.View.RevisionsMode 'remember current mode so we can restore it at the end
ActiveWindow.View.RevisionsMode = wdInLineRevisions 'operate without the balloons confusing things
Dim rvsn As Revision
ActiveDocument.TrackRevisions = True

Dim x As Integer
Original_Author = InputBox("Enter exact name for current revisor", "Current Revisor")

For x = ActiveDocument.Revisions.Count To 1 Step -1 'for each can endless loop because we are creating new revisions inside the loop...
    Set rvsn = ActiveDocument.Revisions(x)
    If rvsn.Author = Original_Author Then
        Select Case rvsn.Type
            Case wdNoRevision
            Case wdRevisionDelete
                rvsn.Range.Select
                'if it was a deletion, reject the change, which leaves the deletion highlighted
                rvsn.Reject
                'and then delete it again
                Selection.Delete
            Case wdRevisionInsert
                rvsn.Range.Select
                'cut it out - which automatically cancels the revision stuff
                Selection.Cut
                'and paste it back
                Selection.PasteAndFormat (wdPasteDefault)
            Case wdRevisionParagraphProperty
            Case wdRevisionReconcile
            Case wdRevisionSectionProperty
            Case wdRevisionStyleDefinition
            Case wdRevisionConflict
            Case wdRevisionDisplayField
            Case wdRevisionParagraphNumber
            Case wdRevisionProperty
            Case wdRevisionReplace
            Case wdRevisionStyle
            Case wdRevisionTableProperty
            Case Else
                MsgBox "huh?"
        End Select
    End If
Next

Set rvsn = Nothing
ActiveWindow.View.RevisionsMode = intMode 'back the way it was
End Sub
0
 
LVL 7

Expert Comment

by:rosesolutions1
ID: 10927879
Sorry, no - author is a read-only field, and there is no practical way to fake it. [In Word 2003 there should be - using WordML - but the file goes unreadable whenever I try - sob.]

My proposed 'solution' to your problem relies upon the idea that the person who wants to claim to be the author is in fact the person who pushes the button.
0
 
LVL 4

Author Comment

by:GearyTech
ID: 10954570
Rosesolutions,

In the end, your code is worth the points... I'll have to deal with the other issue some other way. Thank you for your efforts!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you ever need to create a 20 page Word document for some testing purpose? Are you tired of copying & pasting old boring "lorem ipsum" text over and over again, increasing font size and line space in order to make the document 20+ pages long? Look…
I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question