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.