.
HCLSoftware Business Partner
Domino Consulting Services
CRUCIAL Notes Tools
+1
212-599-2048
Domino Consulting Services
CRUCIAL Notes Tools
Domino administration
Notes development
Chat now
.
EN - English
CN - 中文
JP - 日本語
DE - Deutsch
FR - Français
BR - Português
RU - Pу́сский
IT - Italiano
IN - हिन्दी
ES - Español
KR - 한국어
ID - Indonesia
NL - Dutch
TR - Türkçe
SA - العربية
SE - Svenska
NO - Norsk
PL - Polski
TH - ไทย
DK - Dansk
MY - Malay
PH - Filipino
GR - Ελληνικά
FI - Suomi
IL - עברית
IE - Gaeilge
CZ - Čeština
UA - Українська
RO - Română
VN - Tiếng Việt
BD - বাংলা
HU - Magyar
Need a Domino Consultant? Call NotesMail +1 212-599-2048
-
HCLSoftware Business Partner
LOTUSSCRIPT/COM/OLE CLASSES
Examples: Accessing document properties
1. This example prints properties of a document.
Sub Initialize
Dim db As New NotesDatabase _
("", Inputbox("Name of database file?"))
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set dc = db.AllDocuments
Set doc = dc.GetFirstDocument
Forall docAuthor In doc.Authors
Messagebox docAuthor
End Forall
Messagebox "Created: " & doc.Created
If doc.IsNewNote Then
Messagebox "Is a new note"
End If
If doc.IsResponse Then
Messagebox "Parent: " _
& doc.ParentDocumentUNID
End If
If doc.IsSigned Then
Messagebox "Signed by: " & doc.Signer
Messagebox "Verified by: " & doc.Verifier
End If
If doc.IsValid = True Then
Messagebox "This document is valid."
Else
Messagebox "Document does not exist."
End If
Messagebox "Last accessed: " & doc.LastAccessed
Messagebox "Last modified: " & doc.LastModified
Messagebox "Note ID: " & doc.NoteID
Messagebox "Universal ID: " & doc.UniversalID
End Sub
2. This example creates a new document; puts it in the folders view1, view2, and view3; and prints the folder reference and note ID for each document in the status bar.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = session.CurrentDatabase
If(db.FolderReferencesEnabled) Then
Messagebox ("Folder references enabled")
Else
Messagebox("Folder references are not enabled")
Messagebox("Enabling folder references")
db.FolderReferencesEnabled = True
End If
db.FolderReferencesEnabled = True
Set doc = db.CreateDocument
If Not(doc Is Nothing) Then
Call doc.AppendItemValue("To", _
"Test Document Name")
Call doc.AppendItemValue("Subject", _
"Test Document Topic")
Call doc.Save(True, True)
Messagebox ("Adding document to views")
doc.PutInFolder("view1")
doc.PutInFolder("view2")
doc.PutInFolder("view3")
Call doc.Save(True, True)
End If
Dim doccoll As NotesDocumentCollection
Set doccoll = db.AllDocuments
Set doc = doccoll.GetFirstDocument
While Not(doc Is Nothing)
i = 0
Forall FolderReference In doc.FolderReferences
i = i+1
Print doc.noteid, "", i, "", _
FolderReferences
End Forall
Set doc = doccoll.GetNextDocument(doc)
Wend
End Sub
See Also
Accessing document properties in LotusScript classes
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents