LotusScript for Visual Basic Programmers - IBM Redbooks
LotusScript for Visual Basic Programmers - IBM Redbooks
LotusScript for Visual Basic Programmers - IBM Redbooks
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Set dc = db.AllDocuments<br />
Set doc = dc.GetFirstDocument()<br />
Forall docAuthor In doc.Authors<br />
Messagebox docAuthor<br />
End Forall<br />
Messagebox "Created: " & doc.Created<br />
Messagebox "Last modified: " & doc.LastModified<br />
Messagebox "Note ID: " & doc.NoteID<br />
End Sub<br />
Following is an explanation of the code.<br />
We declare dc as a Notes document collection object which descends from<br />
NotesDatabase.<br />
Dim dc As NotesDocumentCollection<br />
We declare doc as a Notes document object which descends from Notes<br />
Document Collection.<br />
Dim doc As NotesDocument<br />
We get a reference to NotesDocument Collection from the AllDocument<br />
method of NotesDatabase.<br />
Set dc = db.AllDocuments<br />
We get a reference to the first document using the GetFirstDocument<br />
method of the NotesDocument Collection object and store it in doc.<br />
Set doc = dc.GetFirstDocument()<br />
We get all the author names of the first document and put them in the<br />
message box.<br />
Forall docAuthor In doc.Authors<br />
Messagebox docAuthor<br />
End Forall<br />
We get the date when the document was created using the CreateData<br />
property of NotesDocument.<br />
Messagebox "Created: " & doc.Created<br />
Chapter 9: Accessing Notes Documents 157