Examples: AppendToTextList method
- This script appends the text value "Shocks" to the Categories
item in a document. For example, if the Categories item contains the
values "Clocks" and "Blocks" before the script runs, it contains the
values "Clocks," "Blocks," and "Shocks" after the script runs.
Dim doc As NotesDocument Dim item As NotesItem ' ...set value of doc... Set item = doc.GetFirstItem( "Categories" ) Call item.AppendToTextList( "Shocks" ) Call doc.Save( False, True )
- This script appends three new text values to the Categories item
in a document: "Girls," "Boys," and "Toys."
Dim doc As NotesDocument Dim item As NotesItem Dim newVals( 1 To 3 ) As String '...set value of doc... Set item = doc.GetFirstItem( "Categories" ) newVals( 1 ) = "Girls" newVals( 2 ) = "Boys" newVals( 3 ) = "Toys" Call item.AppendToTextList( newVals ) Call doc.Save( False, True )
- This script copies all of the Categories values from document
A onto document B. For example, if the Categories item on document
A contains "Tool" and "Weapon" and the Categories item on document
B contains "Technology," then after the script runs the Categories
item on document B contains three values: "Tool," "Weapon," and "Technology."
Document A is unchanged.
Dim docA As NotesDocument Dim docB As NotesDocument Dim item As NotesItem '...set values of docA and docB... Set item = docB.GetFirstItem( "Categories" ) Call item.AppendToTextList( docA.Categories ) Call docB.Save( False, True )