问题描述
使用Windows 7 x64,我正在创建您的第一个AddIn演练,并且无法访问Inspectors.NewInspector事件中的mailItem.HTMLBody属性。 mailItem.Body工作正常。
查看源代码显示HTML标记。但是,当我在立即窗口中检查变量 mailItem
以查看其 HTMLBody 属性时,我收到错误CS1061:
'MailItem'不包含'HTMLBody'的定义,并且没有扩展方法'HTMLBody'接受
a可以找到类型'MailItem'的第一个参数(你是否缺少using指令或程序集参考?)
是否需要使用指令或程序集引用才能够检查这个属性?
Using Windows 7 x64, I am following the create your first AddIn walkthrough, and am unable to access the mailItem.HTMLBody property in the Inspectors.NewInspector event. mailItem.Body works fine, however.
View Source shows the HTML markup. But when I inspect variable mailItemin the Immediate window to look at its HTMLBody property, I get error CS1061:
'MailItem' does not contain a definition for 'HTMLBody' and no extension method 'HTMLBody' accepting a first argument of type 'MailItem' could be found (are you missing a using directive or an assembly reference?)
Is there a using directive, or assembly reference, required in order to be able to examine this property?
这篇关于Outlook 2016 Visual Studio 2015:无法访问HTMLBody属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!