Check Rich Text Fields For Attachments And Display The Attachment Icon In View If It Has Any Attach

This code will check thre is any attachments in the rich text field named
"Attachment"
then marked a field if there is any attacments and use this field value to
display view icon in the view.
Dim ws As New notesuiworkspace
Dim uidoc As notesuidocument
Dim doc As NotesDocument
Dim rtitem As Variant
Set uidoc = ws.currentdocument
Call uidoc.save
Set doc = uidoc.Document
Set rtitem = doc.GetFirstItem( "Attachment" )
If ( rtitem.Type = RICHTEXT ) Then

If Isarray(rtitem.EmbeddedObjects)Then
Forall o In rtitem.EmbeddedObjects
If ( o.Type = EMBED_ATTACHMENT ) Then
Call doc.replaceitemvalue("AttachFlag","Yes")
Call doc.Save( True, False)
End If
End Forall
Else
Msgbox"fields are empty"
Call doc.Save( True, False)
End If
End If
'Call Source.Refresh
Call uidoc.Save

Surendra Talluri

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close