ControlTipText Property Example

Microsoft Office Outlook 2003

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 Script Editor of a form. To run the code you need to open the form so the Open event will activate. 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.

Sub Item_Open()
  Set MultiPage1 = Item.GetInspector.ModifiedFormPages("P.2").MultiPage1
  Set CommandButton1 = Item.GetInspector.ModifiedFormPages("P.2").CommandButton1
  Set CommandButton2 = Item.GetInspector.ModifiedFormPages("P.2").CommandButton2
  Set CommandButton3 = Item.GetInspector.ModifiedFormPages("P.2").CommandButton3
  
  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