Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.....in WORD?

Status
Not open for further replies.

weeze2

Technical User
Joined
Jun 18, 2002
Messages
129
Location
DK
HI..a newbie question
I have a Word document with form elements and it is protected.
I have some help icons the user can click on and a msgbox gives the help text. (instead of regular yellow comment)
Instead of having the the user click on the icons/picture to get help,..is it possible to have (like in HTML) for example a mouseover event that displays the help text in a "text block" close by and then dissapear again on mouseout?
I know only of msgbox in VB to display a message and it is not that smooth. :)
 
Yes .. it is called a ToolTip .. Look that up in Words VBA Help. The basic syntax is
object.ControlTipText [= String]

HTH
Michael
 
Thanks..but where can I use this code.

I tried putting it on for ex. an objects mouseup event but guess thats not where it should be used??

Its word 97 i am using.
 
Taken from MSDN ..
Page Object, CommandButton, MultiPage Controls, ControlTipText Property Example

The following example defines the ControlTipText property for three CommandButton controls and two Page objects in a MultiPage.

To use this example, copy this sample code to the Declarations portion of a form. Make sure that the form contains:

A MultiPage named MultiPage1.


Three CommandButton controls named CommandButton1 through CommandButton3.
Note For an individual Page of a MultiPage, ControlTipText becomes enabled when the MultiPage or a control on the current page of the MultiPage has the focus.

Private Sub UserForm_Initialize()
MultiPage1.Page1.ControlTipText = "Here in page 1"
MultiPage1.Page2.ControlTipText = "Now in page 2"

CommandButton1.ControlTipText = "And now here's"
CommandButton2.ControlTipText = "a tip from"
CommandButton3.ControlTipText = "your controls!"
End Sub
This works on a User form. Once controls are placed you can also set it as a property... no code needed.
HTH
Michael
 
What about adding a hyperlink to the picture/icon that links back to the same location as the hyperlink and using the hyperlink's "Screen Tip" as your message box.

I did limited testing in Word 2000. Mike
If you're not part of the solution, you're part of the precipitate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top