我有一封传入电子邮件(mail-in db),其中包含一个 RichTextField,可以在其中找到“某些”附件。我还在 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
运行此脚本时,它将找到$FILE 个文件并返回名称,但不返回对象,因此我无法对其进行任何操作。
我该怎么做才能从原始文档中获取 attachment/object($FILE)并将其附加到外发电子邮件中的 RTF?
我考虑过将附件分离到网络,然后将其附加到外发电子邮件,然后从网络中删除附件,但这似乎不切实际。
有没有更好的方法来处理传入电子邮件中的这些$FILE 类型的附件,这将使此操作更容易?
2 回答
尝试
NotesDocument
对象的EmbeddedObjects
属性。像这样:如果愿意,您也可以不分离完成。
您可以在~前面加上$File 字段。