Manage Learn to apply best practices and optimize your operations.

How To Detach Attached Documents From A Rich Text Field (Rtitem) Via Lotusscript

Using LotusScript, how can you extract to a directory all the files attached to
a document's Rich Text Field?

The sample script below illustrates one way to accomplish this.

Note: In order for this script to execute as intended, the fields and
documents must have the names used below.

Dim Doc as NotesDocument
Dim RTItem as variant

' ... Set all the relations ...
' ... Retrieve the field which contains the attachment
Set RTItem =
' ... Test if object exists in the richtextfield
If Isarray( RTItem.EmbeddedObjects) Then
' ... Scan all the objects on the richtextfield
Forall EmbedObject In RTItem.EmbeddedObjects
' ... If they are attachment then detach them
If ( EmbedObject.Type = EMBED_ATTACHMENT ) Then
Call EmbedObject.ExtractFile( "c:\" &
End If
End Forall
End If

Dig Deeper on Domino Resources - Part 4



  • iSeries tutorials'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 ...