GetAsDocument (NotesCalendarNotice - LotusScript®)

Gets the document that contains a calendar notice.

Defined in



Set notesDocument = notesCalendarNotice.GetAsDocument( )
Return value Description
NotesDocument The document.


This agent gets the underlying document for a meeting invitation.
Sub Initialize
	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
	Dim doc As NotesDocument
	Call maildb.Openmail()
	Set cal = session.getCalendar(maildb)
	Set dt1 = session.createdatetime("01/01/2012 00:00 AM")
	Set dt2 = session.createdatetime("Yesterday 00:00 AM")
	invites = cal.Getnewinvitations(dt1, dt2)
	If IsEmpty(invites) Then
		MessageBox "No invitation",, "Nothing"
		Dim invite As NotesCalendarNotice
		Set invite = invites(0)
		Set doc = invite.Getasdocument()
		MessageBox doc.Getitemvalue("subject")(0),, "Invite"
	End If
End Sub