hallo admin,
dazu gibt es gerade in Bezug zur getfirstitem Methode einen Hinweis zu RichText Items, die ja in Notes anders behandelt werden, als normale Items wie Text:
Using this method to get rich text items
The compiler raises an error if you try to set the return value of GetFirstItem equal to a NotesRichTextItem object. This is because a NotesItem is not necessarily a NotesRichTextItem, and the compiler has no way of knowing whether the name$ you specify actually corresponds to a rich text item. For example:
Dim doc As NotesDocument
Dim rtitem As NotesRichTextItem
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
'compiler complains
The solution to this problem is to declare a variant, set it equal to the return value of GetFirstItem, and then treat the variant as a NotesRichTextItem. For example:
Dim doc As NotesDocument
Dim rtitem As Variant
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
'...use NotesRichTextItem methods...
End If