Examples: Forward method

This script forwards the current document. If the document is new, it displays an error message.

Sub Click(Source As Button)
  Dim workspace As New NotesUIWorkspace
  Dim uidoc As NotesUIDocument
  Set uidoc = workspace.CurrentDocument
  If uidoc.IsNewDoc Then
    Messagebox _
    ( "Please save the document before forwarding it.")
  Else
    Call uidoc.Forward
  End If
End Sub