例: FreeTimeSearch method

次の例は、3 人が共通して空いている最初の 60 分の時間帯を検索します。

Dim session As New NotesSession
Dim window As NotesDateRange
Dim startDateTime As New NotesDateTime("Today")
Dim endDateTime As New NotesDateTime("Tomorrow")
Dim names(1 To 3) As String
Dim freeTime As Variant
Set window = session.CreateDateRange()
Set window.StartDateTime = startDateTime
Set window.EndDateTime = endDateTime
names(1) = "Robert Erikson"
names(2) = "Marybeth McKay"
names(3) = "Kerry Jones"
freeTime = session.FreeTimeSearch _
(window, 60, names, True)
Messagebox Error$
If (freeTime(0) Is Nothing) Then
  Messagebox "No Match Found"
Else
  Forall x In freeTime
  Messagebox x.Text
  End Forall
End If