UntilTime (NotesCalendar - LotusScript®)

Read-only. Specifies the time of the last invitation processed by getNewInvitations.

Defined in

NotesCalendar

Data type

NotesDateTime

Syntax

To get: notesDateTime = notesCalendar.UntilTime

Usage

This property is set by getNewInvitations. It can be used as the second parameter to getNewInvitations to get invitations posted since the last call.

Examples

This agent gets calendar invitations for messages starting on January 1, 2012, and invitations since October 1 at midnight. The agent then gets more invitations since the last one processed as the user desires.
Sub Initialize
	REM On Error GoTo handler
	Dim session As New NotesSession
	Dim maildb As New NotesDatabase("", "")
	Dim cal As NotesCalendar
	Dim dt1 As NotesDateTime
	Dim dt2 As NotesDateTime
	Dim invites As Variant
	Call maildb.Openmail()
	Set cal = session.getCalendar(maildb)
	Set dt1 = session.createdatetime("01/01/2012 00:00 AM")
	Set dt2 = session.createdatetime("10/01/2012 00:00 AM")
	invites = cal.Getnewinvitations(dt1, dt2)
	Do
		If IsEmpty(invites) Then
			MessageBox "No invitations",, "Nothing"
		Else
			Dim invite As NotesCalendarNotice
			Dim i As Integer
			On Error Resume Next
					For i = LBound(invites) To UBound(invites)
						Set invite = invites(i)
						MessageBox invite.Read(),, "Invitation"
			Next
		End If
		if (MessageBox(|Do you want to get new invitations since | & _
		cal.Untiltime.Localtime & |?|, MB_YESNO, "Again?") = IDNO) Then
			Exit do
		End if
		invites = cal.Getnewinvitations(dt1, cal.Untiltime)
	Loop
	Exit Sub
handler:
	MsgBox Error,, Err()
	Exit sub
End Sub