Regarding Richtextitem on embedded object

Hi, i urgently need a solution for my problem. I would have to check whether this richtext field whether the user had put in anything… no matter whether is it picture, attachment or etc.

can anyone pls help me with a solution on how to check that is not empty field. i really appreciate a help for this. really need it urgently… thank you for your time. :slight_smile:

Subject: Regarding Richtextitem on embedded object

I wrote the following, it’s not perfect as the “size” seems to be a magic value… I haven’t found anything to tell me what an empty rich text field size would be - seems to change from field to field (I’m guessing the name of it or something)

Function IsRichTextFieldEmpty(doc As NotesDocument, fieldName As String) As Boolean

. . Const MagicSizeValue = 250

. . Dim tmp As Variant

. . Dim blank As Boolean

. .

. . blank = False

. . If doc.HasItem(fieldName) Then

. . . . tmp = doc.GetItemValue(fieldName)

. . . . If Isempty(tmp) Then

. . . . . . blank = True

. . . . Else

. . . . . . If Trim(tmp(0)) = “” Then

. . . . . . . . blank = True

. . . . . . End If

. . . . . .

. . . . . . ’ Looks blank but is there an object?

. . . . . . If blank Then

. . . . . . . . Dim itm As NotesRichTextItem

. . . . . . . .

. . . . . . . . Set itm = doc.GetFirstItem(fieldName)

. . . . . . . . If itm.valuelength > MagicSizeValue Then

. . . . . . . . . . blank=False

. . . . . . . . Else

. . . . . . . . . . ’ One last attemp

. . . . . . . . . . tmp = itm.EmbeddedObjects

. . . . . . . . . . If Not Isempty(tmp) Then

. . . . . . . . . . . . blank=False

. . . . . . . . . . End If

. . . . . . . . End If

. . . . . . End If. .

. . . . End If

. . . .

. . Else

. . . . blank = True

. . End If

. .

. . IsRichTextFieldEmpty = blank

End Function

Subject: RE: Regarding Richtextitem on embedded object

Hi thanks for the reply… i would try on it and see whether it works