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 / Programming / September 2006

Tip: Looking for answers? Try searching our database.

Holy Togglin' Macros!!!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ron - 05 Sep 2006 05:02 GMT
I've recorded a macro that simply makes my hidden text visible. Now I want
to assign the macro to a toolbar button AND get the button to toggle the
visibility of the hidden text. How can I do that?

Thanks in advance.
Jezebel - 05 Sep 2006 05:22 GMT
To assign the macro: right-click any toolbar. Select Customize. On the
Commands tab select 'Macros' from the left-hand list, and then your macro
from the right-hand list. Drag it your toolbar of choice.

To make it toggle, edit the macro code to something like

selection.Font.Hidden = not selection.Font.Hidden

> I've recorded a macro that simply makes my hidden text visible. Now I want
> to assign the macro to a toolbar button AND get the button to toggle the
> visibility of the hidden text. How can I do that?
>
> Thanks in advance.
Russ - 05 Sep 2006 08:21 GMT
Ron,
See Below.

> To assign the macro: right-click any toolbar. Select Customize. On the
> Commands tab select 'Macros' from the left-hand list, and then your macro
[quoted text clipped - 6 lines]
>> I've recorded a macro that simply makes my hidden text visible. Now I want
>> to assign the macro to a toolbar button AND get the button to toggle the

Did you know that the Show/Hide Button (¶) in the standard toolbar can
toggle all hidden text visible and not visible? And that hidden text will
not normally print unless that particular option is selected beforehand
under Tools | Options | Print? Sometimes PrintPreview mode will show less
total pages than the other view modes because it repaginates without the
hidden text taking up space.

One useful function of hiding certain parts of text is to exclude that
hidden text from being used in a sorting process. After the sort is done,
you might choose to change the hidden text back to regular text.

>> visibility of the hidden text. How can I do that?
>>
>> Thanks in advance.

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

Jezebel - 05 Sep 2006 09:16 GMT
What!? The Show/Hide button toggles the display of non-printing characters
(paragraph marks, tabs, spaces). It has nothing to do with hidden text.

> Ron,
> See Below.
[quoted text clipped - 25 lines]
>>>
>>> Thanks in advance.
Graham Mayor - 05 Sep 2006 11:58 GMT
It toggles the *display* of hidden text also - provided it is not checked
for display in tools > options > view.
However if you only want to toggle the *display hidden text option* then a
macro option is the better approach, in this case.

With ActiveWindow.View
   .ShowHiddenText = Not .ShowHiddenText
End With

If you need to print the hidden text you could add that option  (set both
options manually to the same setting first).

With Options
   .PrintHiddenText = Not .PrintHiddenText
End With

- but then the setting of the font attribute as you originally suggested
could be the better choice, though you would need to select your range
first..
Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> What!? The Show/Hide button toggles the display of non-printing
> characters (paragraph marks, tabs, spaces). It has nothing to do with
[quoted text clipped - 35 lines]
>>
>> drsmN0SPAMikleAThotmailD0Tcom.INVALID
Ron - 05 Sep 2006 09:24 GMT
The Show/Hide Button (¶) does what I need beautifully!

Thanks Russ!

> Ron,
> See Below.
[quoted text clipped - 24 lines]
> >>
> >> Thanks in advance.
Russ - 05 Sep 2006 09:38 GMT
Ron,
Your Welcome.
I'm glad the information was useful.

> The Show/Hide Button (¶) does what I need beautifully!
>
[quoted text clipped - 31 lines]
>>>>
>>>> Thanks in advance.

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

 
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.