Gets calendar entries within a given time range.
Syntax
Set entriesVariant = notesCalendar.GetEntries( startNotesDateTime , endNotesDateTime , [ skipcount& ] , [ maxreturn& ] )
Parameter |
Description |
start |
NotesDateTime. The start time
of the entries. |
end |
NotesDateTime. The end time
of the entries. An exception occurs if the end time is not greater
than the start time. |
skipcount |
Long. The number of entries to skip before starting
the get operation. Defaults to 0. |
maxreturn |
Long. The maximum number of entries to return.
If skipcount and maxreturn are not
specified, all entries in the range are returned. |
Return value |
Description |
Variant |
The calendar entries in the range, or an empty
array for no entries. Each array element is of type NotesCalendarEntry. |
Usage
Use the last two parameters in conjunction
with EntriesProcessed to process
entries in successive operations. See EntriesProcessed for an example using the
last two parameters.
Examples
This agent gets calendar and scheduling
information for the current user for today and tomorrow.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 db As NotesDatabase
Dim doc As NotesDocument
Dim body As NotesRichTextItem
REM Get calendar for current user
Call maildb.Openmail()
Set cal = session.getCalendar(maildb) ' Not In ref pane
Set dt1 = session.createdatetime("Today 08")
Set dt2 = session.Createdatetime("Tomorrow 17")
Set db = session.CurrentDatabase
REM Create document to post results
Set doc = db.CreateDocument
doc.Form = "main"
doc.Subject = "Today and tomorrow"
Set body = doc.Createrichtextitem("body")
REM Get entries and put in body of document
ForAll cale In cal.Getentries(dt1, dt2)
Call body.Appendtext(cale.Read())
Call body.Addnewline(1)
End ForAll
Call body.Appendtext(cal.ReadRange(dt1, dt2))
Call doc.Save( True, True )
End Sub