Cancel (NotesCalendarEntry - LotusScript®)

Cancels a meeting entry or entries.

Defined in



Call notesCalendarEntry.Cancel( comments$ , [ scope% ] , [ recurid$ ] )
Parameter Description
comments String. Comments regarding a meeting change.
scope Integer. The scope of a recurring operation:
  • CS_RANGE_REPEAT_FUTURE (3), inclusive
  • CS_RANGE_REPEAT_PREV (2), inclusive
recurid String. The recurrence identifier (RECURRENCE-ID item) for a recurring calendar event. The format of a recurrence identifier is a time in UTC format, for example, 20120913T160000Z.
Possible exception (lsxbeerr.lss) Value Text Description
lsERR_NOTES_ERR_INVALIDID 4757 Invalid ID The identifier for the NotesCalendarEntry object is not valid.
lsERR_NOTES_ERR_RECURID_NOTFOUND 4808 Recurrence-ID not found The recurrence identifier for the NotesCalendarEntry object is not valid.
lsERR_NOTES_ERR_IDNOTFOUND 4814 Identifier not found The recurrence identifier for the NotesCalendarEntry object does not identify an entry in the calendar, or the scope and recurid are missing for a recurring entry.


This method deals with meeting entries, not notices.


This agent cancels the first instance of a recurring meeting.
Sub Initialize
	Dim session As New NotesSession
	Dim maildb As New NotesDatabase("", "")
	Dim cal As NotesCalendar
	Dim calentry As NotesCalendarEntry
	Dim dt1 As NotesDateTime
	Dim dt2 As NotesDateTime
	Dim tday As String
	Dim recurid As String
	Dim entries As Variant
	Dim cale As NotesCalendarEntry
	REM Get calendar for current user and create entry
	Call maildb.Openmail()
	Set cal = session.getCalendar(maildb)
	Set dt1 = session.createdatetime("Today 18")
	Set dt2 = session.createdatetime("Today 18 01")
	tday = Format(Today, "yyyymmdd")
	recurid = tday & "T220000Z"
	entries = cal.Getentries(dt1, dt2)
	If Not IsEmpty(entries) Then
		Set cale = entries(0)
		Call cale.Cancel("No meeting today", Cs_range_repeat_current, recurid)
	End If
End Sub