Examples: Ruler property

These two scripts work together. The first displays the ruler whenever the user places the insertion point in a particular field. The second hides the ruler whenever the user moves the insertion point out of that field.

Sub Entering(Source As Field)
  Dim workspace As New NotesUIWorkspace
  Dim uidoc As NotesUIDocument
  Set uidoc = workspace.CurrentDocument
  uidoc.Ruler = True
End Sub
Sub Exiting(Source As Field)
  Dim workspace As New NotesUIWorkspace
  Dim uidoc As NotesUIDocument
  Set uidoc = workspace.CurrentDocument
  uidoc.Ruler = False
End Sub