Create a new form called "tmp" and put a rich text field called AttachmentsRTF in it. Then create an agent with the code below to extract.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.currentdatabase
Dim ndoc As NotesDocument
Set ndoc = db.createdocument
ndoc.form = "tmp"
Dim RTitem As NotesRichTextItem
Set RTitem = New NotesRichTextItem(ndoc,"AttachmentsRTF")
Dim EO As NotesEmbeddedObject
Set EO = RTitem.EmbedObject (EMBED_ATTACHMENT,"", "D:\Lotus\Domino\Data\sslcertificate.sth")
Call ndoc.save(True,True)
End Sub