Outlook会议和RTF格式 [英] Outlook meetings and rich text format

查看:299
本文介绍了Outlook会议和RTF格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力从Outlook中的Powershell创建约会.除了能够设置约会.RTFBODY似乎一切正常.看起来它存储为字节数组,但是尽管我已尽力并做了许多尝试,但我仍无法对其进行设置.任何建议将不胜感激. http://pastebin.com/kQvGfNRS

I have been working on creating appointments from Powershell in Outlook. Everything seems to be working with the exception of being able to set the appointment.RTFBODY. It looks like it is stored as a byte array, but despite my best efforts and many attempts I have been unable to set it. Any suggestions would be much appreciated. http://pastebin.com/kQvGfNRS

我能够找到可能是类似的问题. https://social.msdn.microsoft.com/Forums/sqlserver/zh-CN/5dba0d12-94e8-47a5-b082-93d3693e2a47/cant-set-the-rtfbody-of-an-pointpointmentitem 我假设您添加了错误的版本引用.如果添加Microsoft.Office.Interop.Outlook 12.0,则可以重现您的问题.建议您删除此引用,然后添加Microsoft.Office.Interop.Outlook 14.0."

I was able to find what could be a similar issue. https://social.msdn.microsoft.com/Forums/sqlserver/en-US/5dba0d12-94e8-47a5-b082-93d3693e2a47/cant-set-the-rtfbody-of-an-appointmentitem "I assume you add a wrong version reference. If you add Microsoft.Office.Interop.Outlook 12.0, I could reproduce your issue. I suggest you remove this reference, and add Microsoft.Office.Interop.Outlook 14.0."

还发现了以下内容: Outlook AppointmentItem-如何以编程方式将RTF添加到其主体?

推荐答案

-这只是OOM中的一个已知问题-使用早期绑定设置RtfBody属性.通过IDispatch :: GetIDsIfNames设置/调用不."

from the link in your question - "it is just a known problem in OOM - setting the RtfBody property using early binding works. Setting through IDispatch::GetIDsIfNames / Invoke does not."

Powershell始终使用后期绑定(即,您不能将变量声明为特定对象的实例,例如AppointmentItem).

Powershell always uses late bindings (i.e. you cannot declare a variable as an instance of a particular object. e.g. AppointmentItem).

这篇关于Outlook会议和RTF格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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