如何以编程方式将HTML代码添加到约会项的正文? (C#) [英] How to programmatically add HTML Code to the body of an Appointment Item? (C#)

查看:116
本文介绍了如何以编程方式将HTML代码添加到约会项的正文? (C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



Hi,

我正在尝试发送约会项目身体为HTML,但我无法做到这一点。由于在appointmentItem中没有HTMLBODY。当我将整个html转换为RTF并尝试以RTFBODY格式发送时,正确的文本格式不可见
和图像也不会出现。

I am trying to send appointmentItem with body as HTML, but i am not able to do that. As there is no HTMLBODY inside appointmentItem. When i am converting the whole html into RTF and trying to send as RTFBODY in that case proper format of text is not visible and images also not appear.

  As i已经查看了许多链接,但没有提供适当的信息。

 As i have viewed many links but on that no proper information is provided.

我正在使用outlook 2013。

I am using outlook 2013.

所以,任何人都可以有任何想法,如何实现这一目标。

So, can anyone having any idea, how to achieve that.

提前致谢

Thanks in advance

推荐答案

Hello John,

Hello John,

Outlook对象模型没有为此提供任何内容。约会项目使用RTF标记为他们的身体。

The Outlook object model doesn't provide anything for that. Appointment items use the RTF markup for their bodies.

但是,您可以尝试在扩展MAPI级别设置低 - 级别属性 -
PR_HTML < /强>属性。 DASL名称为" http://schemas.microsoft.com/mapi/proptag/0x10130102 " 。只是尝试使用任何低级属性资源管理器工具,如MFCMAPI
或OutlookSpy来查看隐藏属性。

However, you can try to set a low-level property on the Extended MAPI level - the PR_HTML property. The DASL name is "http://schemas.microsoft.com/mapi/proptag/0x10130102" . Just try to use any low-level property explorer tool such as MFCMAPI or OutlookSpy for viewing hidden properties.


PropertyAccessor
对象可以帮助您完成此类任务。 使用  PropertyAccessor   获取和设置未在Outlook对象模型中显式公开
的项级属性的对象,或以下非项对象的属性: 
AddressEntry   AddressList   附件   ExchangeDistributionList   ExchangeUser   文件夹   收件人
 
< a href ="https://msdn.microsoft.com/en-us/library/office/ff862128.aspx"style ="color:#00709f; text-decoration:none">商店

The PropertyAccessor object can help you with such tasks. Use the PropertyAccessor object to get and set item-level properties that are not explicitly exposed in the Outlook object model, or properties for the following non-item objects: AddressEntry, AddressList, Attachment, ExchangeDistributionList, ExchangeUser, Folder, Recipient, and Store.

请注意,PropertyAccessor对象有它自己的限制,不允许一次设置超过16 Kb的属性。你需要使用

OpenProperty
。或者可以考虑使用扩展MAPI周围的任何包装器(对于例如,赎回)。

Be aware, the PropertyAccessor object has its own restrictions and doesn't allow to set properties more than 16 Kb at a time. You need to use the OpenProperty of the IMAPIProp interface for setting such values. Or you may consider using any wrapper around Extended MAPI (for example, Redemption).


这篇关于如何以编程方式将HTML代码添加到约会项的正文? (C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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