LOTUSSCRIPT/COM/OLE CLASSES
Sub detachFiles( doc As NotesDocument ) Dim rtitem As Variant Set rtitem = doc.GetFirstItem( "Body" ) Forall o In rtitem.EmbeddedObjects If o.Type = EMBED_ATTACHMENT Then Call o.ExtractFile( "c:\newfiles\" & o.Source ) Call o.Remove Call doc.Save( True, True ) End If End Forall End Sub