.
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: GetFirstItem method
1. This script prints a message about the Subject item in a document.
Dim doc As NotesDocument
'...set value of doc...
Dim item As NotesItem
Set item = doc.GetFirstItem( "Subject" )
If ( item Is Nothing ) Then
Messagebox( "No Subject item on the document." )
Else
Messagebox( _
"The Subject item on the document has the value: " _
+ item.Text )
End If
2. This example demonstrates an attempt to get the value of the DateComposed item in a document. If there is no such item (possibly because DateComposed is only a field that's computed for display), it uses the Created property instead.
Dim doc As NotesDocument
Dim item As NotesItem
Dim dateTime As New NotesDateTime( "" )
'...set value of doc...
Set item = doc.GetFirstItem( "DateComposed" )
' An item called DateComposed doesn't exist on the document
If ( item Is Nothing ) Then
dateTime.LSLocalTime = doc.Created
' an item called DateComposed exists
' on the document
Else
Set dateTime = item.DateTimeValue
End If
3. This script gets a rich text item from a document and adds some text to it.
Dim doc As NotesDocument
Dim rtitem As NotesRichTextItem
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
Call rtitem.AppendText( "One line of text" )
Call rtitem.AddNewLine( 2 )
Call rtitem.AppendText( "Another line of text" )
Call doc.Save( False, True )
End If
See Also
GetFirstItem method
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents