Check a specific richtext field for attachment?

Hi all,

This is the situation.

I have a form (NAW). This form contains several fields. Three of them are richtext fields.

(Richtext1, Richtext2, Richtext3).

I only need to check whether Richtext1 contains an attachment.

Is this possible? (in formula or lotusscript).

Thanks, in advance,

Hasan.

Subject: Check a specific richtext field for attachment?

I used the solution of Betsy Thiede.Title of his article: “Checking to see if a graphic has been pasted in a richtext field on the save of the document…”

I just adapted the code to my needs and it works great.

Dim w As notesuiworkspace

Set w = New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Set uidoc= w.CurrentDocument

Dim body As NotesRichTextItem

Dim rtnav As NotesRichTextNavigator

Dim elemType As Long

Set session = New NotesSession

Set db = session.CurrentDatabase

Call source.refresh(True)

Set doc = source.document

Set body = doc.GetFirstItem(“Foto”)

Set rtnav = body.CreateNavigator

Dim rtrange As NotesRichTextRange

Set rtrange = body.CreateRange

elemType = RTELEM_TYPE_FILEATTACHMENT

If rtnav.FindFirstElement(elemType) Then

Call uidoc.fieldsettext("statusfoto","HasInfo")

	

Else

Call uidoc.fieldsettext("statusfoto","HasnoInfo")

End If

Thank you Betsy,

Hasan Aktas.