#1
|
|||
|
|||
Revision toggle without changing revision view?
I'm trying to write a macro that will toggle the tracking without changing the current setting of the revision display. Why is the following code not working? It turns on the mark-up display when the tracking is turned on too. What I want to achieve is just to turn on tracking without disturbing the current revision display setting.
Code:
Sub ToggleTrackRevision() Dim Display Display = ActiveDocument.ShowRevisions ActiveDocument.TrackRevisions = True ActiveDocument.ShowRevisions = Display End Sub |
#2
|
||||
|
||||
The probable reason your code doesn't work is that it:
a) captures the current setting, b) turns on track changes, c) restores the original setting. So, unless track changes was already 'on' when you started the macro, it would be 'off' again once the macro has finished running. All you need is: ActiveDocument.TrackRevisions = True which hardly seems worth a macro - you can achieve the same result by adding the 'track changes' option to the status bar, then clicking on that any time you want to change the state.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Quote:
The track change option will turn on the revision display as it turns on the tracking. |
#4
|
||||
|
||||
Well you have to decide whether you want the tracking to show. Your code simply retains whatever the existing setting is and can therefore be reduced to one line; merely turning on track changes doesn't change whether they're displayed. If, however, you want to turn on track changes without displaying them, you need something like:
Code:
Sub Demo() ActiveDocument.TrackRevisions = True ActiveDocument.ShowRevisions = False End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Quote:
With Word 2003, turning on the tracking will turn on the tracking display too. Give it a try. Turn off both the revision display and the tracking. Now turn on just the tracking (ctrl + shift + e by default). You'll notice that the revision display will come on together. I want to prevent that. |
#6
|
||||
|
||||
OK, with my testing on Word 2003, both your original macro and the one from my last post allow change tracking to be turned on without showing the markup. The only difference is that mine explicitly turns it off whereas yours retains whatever the entry state was, which might already have been one of the markup views.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
Quote:
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Having Revision Bars Persist after Accepting Changes | gocuse | Word | 3 | 08-20-2017 10:47 PM |
Want: Revision Bars in Margin, How? | sbianco | Word | 6 | 08-18-2017 06:28 AM |
How do you make the cursor stay put when you switch between final & revision views? | New Daddy | Word | 1 | 09-22-2013 04:44 AM |
Arrows and text boxes disappear when changing view? | Jesse | Word | 4 | 06-12-2012 05:28 PM |
Macro for tagging and rearranging selected text for revision | caotico | Word VBA | 0 | 03-28-2012 06:35 PM |