Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Menus and Toolbars / March 2008

Tip: Looking for answers? Try searching our database.

Modifying Reviewing toolbar?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pjs - 25 Mar 2008 16:44 GMT
(Using Office 2003 and Windows XP)

I use Track Changes all the time. I would like to find a way to create a
keyboard shortcut to change the view in the Reviewing toolbar from Final
Showing Markup to Final (a toggle would be eve better). Is that possible?

I know how to assign keystrokes to commands, but can't seem to track down
the command that changes the Reviewing view.

Thanks,

pjs
Klaus Linke - 25 Mar 2008 18:58 GMT
Hi pjs,

I usually start to write something like that using the macro recorder.

Switching back and forth between the views you want to toggle gives you

' recorded changing from Final Showing Markup to Final:
 With ActiveWindow.View
   .ShowRevisionsAndComments = False
   .RevisionsView = wdRevisionsViewFinal
 End With

' recorded changing from Final to Final Showing Markup:
 With ActiveWindow.View
   .ShowRevisionsAndComments = True
   .RevisionsView = wdRevisionsViewFinal
 End With

You don't want to change the .RevisionsView, so you can delete that line.

If you are familiar with the "Not" operator, that gives you a nice and short
way to do the toggling, independent of the current state:

 With ActiveWindow.View
   .ShowRevisionsAndComments = Not .ShowRevisionsAndComments
 End With

Regards,
Klaus

> (Using Office 2003 and Windows XP)
>
[quoted text clipped - 8 lines]
>
> pjs
pjs - 25 Mar 2008 19:23 GMT
Klaus --

Excellent answer. Thanks!

After I wrote that post, I realized I could use the macro recorder, and so
created two brief macros to which I assigned different keyboard shortcuts.
Your comment about the "Not" function gave me pause (being very new to VBA).
Are you saying that with it I could have a single macro, assigned to a single
keyboard shortcut, that would toggle back and forth between Final Showing
Markup and Final views?

pjs

> Hi pjs,
>
[quoted text clipped - 38 lines]
> >
> > pjs
Klaus Linke - 25 Mar 2008 19:33 GMT
Yep, exactly. A more "pedestrian" way for the same result could be an "If
... Else... End If":

With ActiveWindow.View
   If .ShowRevisionsAndComments = True Then
       .ShowRevisionsAndComments = False
   Else
       .ShowRevisionsAndComments = True
   End If

(BTW, "If .ShowRevisionsAndComments = True Then" is the same as "If
.ShowRevisionsAndComments Then")

Regards,
Klaus

> Klaus --
>
[quoted text clipped - 10 lines]
>
> pjs
pjs - 25 Mar 2008 19:50 GMT
Very interesting. Thanks for the lesson. I've tried learning VBA from a
couple books, but that isn't a practical way to learn, at least not for me.
Digging in, making mistakes, and asking for help -- and getting great advice
like yours -- seems to be the only way I'm going to understand VBA.

I appreciate your help.

pjs

> Yep, exactly. A more "pedestrian" way for the same result could be an "If
> .... Else... End If":
[quoted text clipped - 26 lines]
> >
> > pjs
Klaus Linke - 25 Mar 2008 22:50 GMT
> [...] -- seems to be the only way I'm going to understand VBA.

It's not made simpler by the fact that you need a smattering of knowledge
about boolean algebra on top of it, in this case.

Boolean algebra is calculating with variables that can only take two values,
often denoted as "True" and "False".

In "If [expression] then...", the [expression] has to be something that
evaluates as either "True" or as "False".

"If [expression] = True Then"
is the same as
"If [expression] Then"
because there are two possible values for [expression] ...

In case [expression] is True then "[expression] = True" is True because
"(True = True)" evaluates to "True".
In case [expression] is False then "[expression] = True" is False because
"(False = True)" evaluates to "False".

The Not operator in front of any expression turns its value into the other
value:

Not [expression] is ...
... False if [expression] is True
... True if [expression] is False

Greetings,
Klaus
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.