文書識別子が指定された場合に、カレンダーエントリを取得します。
パラメータ | 説明 |
---|---|
noteid | String 型。エントリを含む Domino 文書の文書識別子。 |
戻り値 | 説明 |
---|---|
NotesCalendarEntry | カレンダーエントリ。識別子が正しくない場合は、例外が発生します。 |
Sub Initialize
Dim session As New NotesSession
Dim maildb As New NotesDatabase("", "")
Dim calview As NotesView
Dim caldoc As NotesDocument
Dim noteid As String
Dim cal As NotesCalendar
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim body As NotesRichTextItem
Dim s As String
Dim n As long
REM Get calendar for current user
Call maildb.Openmail()
Set cal = session.getCalendar(maildb)
Set db = session.CurrentDatabase
REM Get number of calendar entry
s = InputBox("Enter an integer", "calentry", 1)
If IsNumeric(s) Then
n = Clng(s)
Else
MessageBox "Not numeric: " & s,, "Error"
End If
REM Create document to post results
Set doc = db.CreateDocument
doc.Form = "main"
doc.Subject = "Calendar entry"
Set body = doc.Createrichtextitem("body")
REM Get entry and put in body of document
Set calview = maildb.Getview("($Calendar)")
Set caldoc = calview.Getnthdocument(n)
If caldoc Is Nothing Then
body.Appendtext("Calendar entry out of range")
Else
noteid = caldoc.Noteid
body.Appendtext("Calendar entry for Note ID " & noteid)
body.Addnewline(1)
body.Appendtext(cal.Getentrybynoteid(noteid).Read())
End If
Call doc.Save( True, True )
End Sub
Java™ NotesCalendar クラスの getEntryByNoteID メソッド