Examples: AddParticipant method

This form action adds a participant to an embedded scheduler.

%INCLUDE "lsconst.lss"
Sub Click(Source As Button)
  Dim ws As NotesUIWorkspace
  Dim uid As NotesUIDocument
  Dim uis As NotesUIScheduler
  Dim partName As String
  Dim partRole As Long
  Set ws = New NotesUIWorkspace
  Set uid = ws.CurrentDocument
  Set uis = uid.GetSchedulerObject("Main")
  partName = Inputbox("Name of meeting participant", _
  "Add participant")
  If partName = "" Then Exit Sub
  If Messagebox("Is this participant the chair?", _
  MB_YESNO + MB_QUESTION, _
  "Add participant") = IDYES Then
    partRole = PARTICIPANTROLE_CHAIR
  Else
    partRole = PARTICIPANTROLE_REQATT
  End If
  Call uis.AddParticipant(partName, _
  partRole, _
  PARTICIPANTSTATUS_ACCEPT, _
  PARTICIPANTTYPE_PERSON, _
  "", _
  partName & "@lotus.com")
  Call uis.GetScheduleData
End Sub