使用put_body()为RTF消息添加正文会将附件移动到电子邮件的末尾。 [英] Appending body using put_body() for RTF messages is moving the attachments to the end of the email.

查看:92
本文介绍了使用put_body()为RTF消息添加正文会将附件移动到电子邮件的末尾。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为Rich Text电子邮件追加字符串。当用户点击发送按钮时,我收到通知。我正在为Outlook :: Applications获取事件。当我收到通知时,我使用Outlook :: _ MailItems并使用put_body()方法追加
字符串。但是,这正在改变附加的附件的位置。我尝试使用put_position()但它没有用。有没有其他方法可以将附件推到身体的末端?

I need to append strings for Rich Text emails. I am getting notification when user clicks on send button. I am getting events for Outlook::Applications. When I get the notifications, I am using Outlook::_MailItems and using put_body() method to append the strings. But, this is changing the positions of attachments added. I tried using put_position() but it didn't work. Is there any other way so that attachments are not pushed to end of the body?

提前致谢。

推荐答案

更糟糕的是,设置纯文本Body属性也会消除HTML和RTF消息的所有格式。

Worse than that, setting the plain text Body property will also wipe out all the formatting both for the HTML and RTF messages.

您需要设置HTMLBody或RtfBody属性(取决于邮件格式)。请注意,在这两种情况下,旧数据和新数据都无法连接,必须将它们合并。

You need to set the HTMLBody or RtfBody properties (depending on the message format). Note that in both cases old and new data cannot be concatenated, they must be merged.


这篇关于使用put_body()为RTF消息添加正文会将附件移动到电子邮件的末尾。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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