【问题标题】:Create a vote in an EmailMessage with the extendedProperties field (EWS)使用扩展属性字段 (EWS) 在 EmailMessage 中创建投票
【发布时间】:2021-03-22 10:41:25
【问题描述】:

我遇到的问题是,如果我试图通过在 EmailMessage 中设置 ExtendedProperty 来创建投票,它将不会显示在电子邮件中。这是我到目前为止得到的:

Guid MyPropertySetId = new Guid("{00020329-0000-0000-C000-000000000046}");

ExtendedPropertyDefinition extendedPropertyDefinition = new ExtendedPropertyDefinition(MyPropertySetId, 0x00008520, MapiPropertyType.String);
MessageToAddTo.SetExtendedProperty(extendedPropertyDefinition, "yes;no");

读完这篇文章后,我想我终于要找到正确的解决方案了:How to access extended properties set with EWS when accessing the item in VSTO for Outlook

该属性在发送邮件时明确设置,但当我收到邮件时,投票丢失。

【问题讨论】:

    标签: outlook exchangewebservices


    【解决方案1】:

    当您尝试设置 PidLidVerbStream 的正确属性时 属性http://msdn.microsoft.com/en-us/library/ee218541(v=exchg.80).aspx 是具有复杂字节流值的二进制属性,如上所述。下面是一些设置https://gsexdev.blogspot.com/2015/01/sending-message-with-voting-buttons.htmlhttps://gsexdev.blogspot.com/2015/08/owa-voting-button-compose-app-for.html 的示例。对于您的属性定义,您只需要

    ExtendedPropertyDefinition extendedPropertyDefinition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Common, 0x00008520, MapiPropertyType.Binary);
    

    【讨论】:

      猜你喜欢
      • 2023-04-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-26
      • 2011-10-08
      • 2012-05-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多