- This script creates three new items in a document: a text item,
a number item, and a date-time item.
Dim doc As NotesDocument
Dim textItem As NotesItem
Dim numberItem As NotesItem
Dim dateTimeItem As NotesItem
'...set value of doc...
Set textItem = New NotesItem _
( doc, "Region", "South America" )
Set numberItem = New NotesItem( doc, "Earnings", 98 )
Set dateTimeItem = New NotesItem _
( doc, "LastAccessed", Today )
Call doc.Save( True, True )
- This script creates a new text item in a document and gives it
multiple values. The values in the text list are Bicycle, Train, and
Foot.
Dim doc As NotesDocument
Dim textListItem As NotesItem
Dim newValues( 0 To 2 ) As String
'...set value of doc...
newValues( 0 ) = "Bicycle"
newValues( 1 ) = "Train"
newValues( 2 ) = "Foot"
Set textListItem = New NotesItem _
( doc, "Choices", newValues )
Call doc.Save( True, True )
- This script creates a new Authors item in a document. The values
in the item are Mariko Nakamura and Pierre Singer.
Dim doc As NotesDocument
'...set value of doc...
Dim newValues( 1 To 2 ) As String
newValues( 1 ) = "Mariko Nakamura"
newValues( 2 ) = "Pierre Singer"
Dim authorsItem As New NotesItem(doc, "docAuthors", _
newValues, AUTHORS)
Call doc.Save( True, True )