title: Need to work with $FILE attachments and I cannot access them
body: <p>I have an incoming email (mail-in db) that contains a RichTextField where "some" attachments are found. I am also finding attachments not in the RTF but in the Document as $FILE. I am trying to get a handle on all the objects to copy them to another outgoing email. I can find the $FILE using the code below.</p>
  
  <pre><code> Dim rtiObject as NotesEmbeddedObject
   Dim rti_Email as NotesRichTextItem
   Dim obj_Email as NotesEmbeddedObject
   ForAll p in mailDoc.items
     if p.Name = "$FILE" then
       set obj_Email = mailDoc.GetAttachment(p.Values(0)) 'this will return the Name of the attachment (or file)
       set rtiObject = rti_Email.EmbedObject( EMBED_ATTACHMENT, "", obj_Email.Name) 'this is supposed to attach the file to the document's RTF
     End If
   End ForAll
  </code></pre>
  
  <p>When this script runs it finds the $FILE files and returns the name but not the object and I cannot do anything with it from there. </p>
  
  <p>What do I need to do to get the attachment/object ($FILE) from the original doc and attach it to an RTF in the outgoing email? </p>
  
  <p>I thought about detaching the attachment to the network and then attaching it to the outgoing email and then deleting the attachment from the network but that seems impractical.</p>
  
  <p>Is there a better way to handle these $FILE type of attachments on the incoming email that would make this easier?</p>