以编程方式将PDF从MemoryStream附加到Outlook电子邮件项目 [英] Programmatically Attach PDF from MemoryStream to Outlook E-Mail Items

查看:129
本文介绍了以编程方式将PDF从MemoryStream附加到Outlook电子邮件项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将 MemoryStream 或其他功能中的PDF附加到Outlook电子邮件项目 MailItem.Attachment.add(),而不是通过这种方法传递文件的物理路径来从硬盘上的文件中获取数据.

Would it be possible to attach PDF from MemoryStream or other functions to Outlook E-Mail Items MailItem.Attachment.add(), rather than from the file on the hard disk by passing the physical path of file in this method.

我想以编程方式为用户创建带有PDF附件的Outlook mailitem,并让用户自己查看和发送电子邮件.

I would like to create the Outlook mailitem for the users with the PDF attached programmatically, and let the users to review and send out the email by themselves.

谢谢.

推荐答案

不使用Outlook对象模型-扩展的MAPI (C ++或Delphi)仅对IStream对象起作用( IAttach::OpenProperty(PR_ATTACH_DATA_BIN, IID_IStream,...)),兑换,您可以将文件名,URL,数组,IStream或IStorage传递给 RDIOAttachments.Add .

Not using the Outlook Object Model - Attachments.Add will only let you pass a file name for the olByValue attachments. Extended MAPI (C++ or Delphi) only operates on IStream objects (IAttach::OpenProperty(PR_ATTACH_DATA_BIN, IID_IStream,...)), Redemption lets you pass file name, url, array, IStream or IStorage to RDIOAttachments.Add.

这篇关于以编程方式将PDF从MemoryStream附加到Outlook电子邮件项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆