Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2014, 01:58 PM
New Daddy New Daddy is offline Revision toggle without changing revision view? Windows Vista Revision toggle without changing revision view? Office 2003
Advanced Beginner
Revision toggle without changing revision view?
 
Join Date: Jan 2012
Posts: 90
New Daddy is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 04-15-2014, 02:18 PM
macropod's Avatar
macropod macropod is offline Revision toggle without changing revision view? Windows 7 32bit Revision toggle without changing revision view? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 04-15-2014, 05:32 PM
New Daddy New Daddy is offline Revision toggle without changing revision view? Windows Vista Revision toggle without changing revision view? Office 2003
Advanced Beginner
Revision toggle without changing revision view?
 
Join Date: Jan 2012
Posts: 90
New Daddy is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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.
But your suggestion doesn't achieve what I want to achieve besides turning on/off tracking: I want to keep the current revision display setting. If revision display is off, it shouldn't be turned on by switching on/off the tracking; if revision display is on, it shouldn't be turned off by switching on/off the tracking.

The track change option will turn on the revision display as it turns on the tracking.
Reply With Quote
  #4  
Old 04-15-2014, 05:39 PM
macropod's Avatar
macropod macropod is offline Revision toggle without changing revision view? Windows 7 32bit Revision toggle without changing revision view? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #5  
Old 04-15-2014, 05:47 PM
New Daddy New Daddy is offline Revision toggle without changing revision view? Windows Vista Revision toggle without changing revision view? Office 2003
Advanced Beginner
Revision toggle without changing revision view?
 
Join Date: Jan 2012
Posts: 90
New Daddy is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
merely turning on track changes doesn't change whether they're displayed.
I think you and I may be using different versions of Word. I'm on Word 2003.
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.
Reply With Quote
  #6  
Old 04-15-2014, 05:57 PM
macropod's Avatar
macropod macropod is offline Revision toggle without changing revision view? Windows 7 32bit Revision toggle without changing revision view? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #7  
Old 04-15-2014, 05:59 PM
New Daddy New Daddy is offline Revision toggle without changing revision view? Windows Vista Revision toggle without changing revision view? Office 2003
Advanced Beginner
Revision toggle without changing revision view?
 
Join Date: Jan 2012
Posts: 90
New Daddy is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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.
That is strange.. So, my macro actually performs what I intended on your system, while it doesn't on my system. Let me look into it. Thanks for the info.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Revision toggle without changing revision view? 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
Revision toggle without changing revision view? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 03:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft