.
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: Text property
1. This script uses the Text property to get the contents of the Categories item, which is a text list. Suppose Categories contains three values: "pine tree," "maple tree," and "spruce tree." The Text property returns the string "pine tree;spruce tree;maple tree" and places it in the contents variable.
Dim doc As NotesDocument
'...set value of doc...
Dim item As NotesItem
Dim contents As String
Set item = doc.GetFirstItem( "Categories" )
contents = item.Text
2. This script uses the Text property to get the contents of the Amount item, which is of type Number. Suppose the Amount item contains 35.2. The Text property returns the string "35.2" and places it in the contents variable.
Dim doc As NotesDocument
Dim item As NotesItem
Dim contents As String
'...set value of doc...
Set item = doc.GetFirstItem( "Amount" )
contents = item.Text
3. This function takes any NotesDocument and uses the Text property to create a plain-text rendering of it. For each item on the document whose name does not contain "$", the function places the name and text of the item into the Body item of a new document. The new document is returned to the calling routine. Note that plainItem is declared as a NotesRichTextItem only so that the script can use the AddNewLine method to insert new lines to separate each item.
Function createPlainDoc( doc As NotesDocument ) As NotesDocument
Dim db As NotesDatabase
Dim plainDoc As NotesDocument
Dim plainItem As NotesRichTextItem
Set db = doc.ParentDatabase
Set plainDoc = New NotesDocument( db )
Set plainItem = New NotesRichTextItem _
( plainDoc, "Body" )
itemList = doc.Items
Forall i In itemList
If ( Instr( i.Name, "$" ) = 0 ) Then
Call plainItem.AppendText( i.Name + ": " + i.Text )
Call plainItem.AddNewLine( 1 )
End If
End Forall
Set createPlainDoc = plainDoc
End Function
See Also
Text property
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents