LOTUSSCRIPT/COM/OLE CLASSES


Getting an item and its values in LotusScript classes
Example

The NotesDocument class provides several properties and methods to access the items in the document. If you do not know the name of an item or want to traverse the items in a document, you can use the Items property, an array of NotesItem objects. As you access each array element, use the NotesItem properties and methods to interrogate and manipulate the object.

To access an item whose name is known, use the GetFirstItem of NotesDocument.

You can get the value of an item through several techniques. The first two techniques do not require that you first access the item object.


To get the value of a date-time item as a NotesDateTime object rather than a Variant of type Date, use GetItemValueDateTimeArray or GetValueDateTimeArray.

To get the text values of the items named Received in a document, use GetReceivedItemText.

If multiple items in a document have the same name, programmatic access is limited to the first item. The remaining items yield invalid data. A work-around is to get the first item, process it, remove it, again get the first item (which was the second item), and so on until you process and remove all the items of a particular name. If you do not save the document, the items are not actually removed. However, the recommendation is that you avoid creating multiple items with the same name.

Example
See Also