需要使用$ FILE附件,我无法访问它们

Roy*_*ner 7 lotusscript attachment richtext

我有一个收到的电子邮件(mail-in db),其中包含一个RichTextField,其中找到了"some"附件.我也发现附件不是在RTF中,而是在文档中作为$ FILE.我试图处理所有对象,将它们复制到另一个外发电子邮件.我可以使用下面的代码找到$ FILE.

 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
Run Code Online (Sandbox Code Playgroud)

当这个脚本运行时,它找到$ FILE文件并返回名称而不是对象,我不能从那里做任何事情.

从原始文档中获取附件/对象($ FILE)并将其附加到外发电子邮件中的RTF,我需要做什么?

我考虑将附件分离到网络,然后将其附加到外发电子邮件,然后从网络中删除附件,但这似乎不切实际.

是否有更好的方法来处理传入电子邮件中的这些$ FILE类型的附件,这将使这更容易?

小智 3

尝试对象EmbeddedObjects的属性NotesDocument。像这样的东西:

Forall obj_Email in MailDoc.EmbeddedObjects
  If obj_Email.Type = EMBED_ATTACHMENT then
    Call obj_Email.Extract(sometempdirectory$ & obj_Email.Name)
    Call rti_Email.EmbedObject(EMBED_ATTACHMENT, "", sometempdirectory$ & obj_Email.Name)
End Forall
Run Code Online (Sandbox Code Playgroud)

如果您愿意,也可以在不分离的情况下进行操作。