Markup View in Word 2003 - Need code to turn it off if it's on

  • Thread starter PegDalyPA via OfficeKB.com
  • Start date
P

PegDalyPA via OfficeKB.com

Hi, Everyone:

I'm trying to find a way to turn off View, Markup that I can add to the code
that's executed with my templates. I found the following in another
message/thread, but I don't think this will work for me.
.........

ActiveDocument.TrackRevisions returns a Boolean True if Track Revisions is
turned on.

You can turn it on using:

ActiveDocument.TrackRevisions = True

or off with:

ActiveDocument.TrackRevisions = False

-------

I don't want to make it stop "tracking" changes since the users may need it.
I just don't want it EVER to DEFAULT to viewing them (which it has been -
OFTEN - it's driving me crazy). When I tried recording a macro while turning
off Markup View, all I got was the following line:

WordBasic.ViewChanges

...which seems to be telling it to turn Markup View ON instead of OFF (which
tells me that it's probably just a toggle switch. Is there a way to check to
see if it's already in Markup View before doing the toggle (using an if
statement), like this?

If (some code to check for Markup View, NOT document tracking) = True then
WordBasic.ViewChanges
End if

Does anyone have any suggestions?

Thanks in advance,
Peg
 
C

Cindy M.

Hi PegDalyPA,
I'm trying to find a way to turn off View, Markup that I can add to the code
that's executed with my templates.
See the RevisionsView method in Word's Help:

ActiveDocument.ActiveWindow.View.RevisionsView

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
P

PegDalyPA via OfficeKB.com

When I search for the code you mentioned in Word's Help, as suggested, I get
a list of ways to switch from one type of view to another from the Menu bars,
etc. I already know how to do that.

What I need to do is, specifically, turn off View, Markup. If I put the
command that I already know in a macro, it might end up toggling Markup View
ON (if it's already off) (see original post).

I tried searching for the command you mentioned in the Visual Basic Editor's
Help and it doesn't find anything at all.

I've learned VBA on my own and, therefore, have gaps in my knowledge of it,
and I have no other resources to search for this command to see what it does.
Can anyone help me? If I CAN use this to accomplish my task, how exactly
would the line of code read? Would it be like this or am I missing some
vital piece of information (again)???

ActiveDocument.ActiveWindow.View.RevisionsView = False

or am I way off track?

Thanks again for your help.
 
J

Jay Freedman

The dropdown on the Reviewing toolbar that has choices such as "Final"
and "Final with Markup", etc., combines two separate properties in
VBA.

One is the .RevisionsView property. It isn't a true/false value, but
one of two values, either wdRevisionsViewFinal or
wdRevisionsViewOriginal. If you set it to wdRevisionsViewFinal, you'll
see the text with the changes included; the other value shows you the
text before the changes were made.

The second property is .ShowRevisionsAndComments, which controls
whether the changes are visible or hidden. This one _is_ a true/false
value, True to show the changes and False to hide them.

So to get the same effect as setting the Reviewing toolbar dropdown to
"Final", you need this code:

With ActiveDocument.ActiveWindow.View
.RevisionsView = wdRevisionsViewFinal
.ShowRevisionsAndComments = False
End With

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top