The general procedure, the last example, uses an argument that will allow
you to determine whether the procedure will run your code for show the text
or run the code for hiding the text. Right now, 0=Hide and 1=Show. (But they
can mean anything you want).
Then in the Select Case statement, add your code accordingly.
Case 0
'Add your hide text code
Case 1
'Add your show text code.
Each command button does need some type of procedure, even if it's to call
another procedure, and you'd use one of the following:
In the empty procedure behind each command for showing the text you need:
Call ShowRevealText(1)
In the empty procedure behind each command button for hiding the text you
need:
Call ShowRevealText(0)
If you're using just one line of code then perhaps you don't need something
so elaborate. Are you just changing ShowHiddenText? If that's the case then
you might be able to use a single button that will toggle the display
accordingly, such as:
ActiveWindow.View.ShowHiddenText = Not ActiveWindow.View.ShowHiddenText
Or you could call a general procedure from each button even if it is a
single line. That way if you do want to add something you only need to do it
once.
Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.
~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP
Co-author of Word 2007 Inside Out:
http://www.microsoft.com/MSPress/books/9801.aspx#AboutTheBook
Word FAQ:
http://mvps.org/word
TechTrax eZine:
http://mousetrax.com/techtrax/
MVP FAQ site:
http://mvps.org/