Outlook 2007 - 自定义属性在发送到达时将消失

时间:2010-09-10 20:21:59

标签: outlook outlook-2007 outlook-addin

我在项目中添加了一个outlook,可以在检查器中为邮件设置自定义属性 我在Outlook 2007中有一个带有自定义属性的邮件项目,我尝试将其发送到我自己的地址,然后在没有自定义属性的情况下接收它。
我已经验证用户属性是发送事件中的邮件 我在某处读到了为了工作,我必须选择“使用Outlook RTF格式发送”格式选项,但它也不起作用。
谁能告诉我什么是错的?

我正在使用Add-in Express。这是我用于向邮件项添加自定义属性的代码:

    var _Inspector = this.InspectorObj as Outlook.Inspector;
    if (_Inspector != null)
    {
        var _Item = _Inspector.CurrentItem as Outlook.MailItem;
        var _UserProperties = _Item.UserProperties;

        var _UserProperty1 = _UserProperties.Item(PropertyNames.UserProperty1);
        if (_UserProperty1 == null)
        {
            _UserProperties.Add(PropertyNames.UserProperty1, Outlook.OlUserPropertyType.olText, true, Type.Missing);
            _UserProperty1 = _UserProperties.Item(PropertyNames.UserProperty1);
        }
        var _UserProperty2 = _UserProperties.Item(PropertyNames.UserProperty2);
        if (_UserProperty2 == null)
        {
            _UserProperties.Add(PropertyNames.UserProperty2, Outlook.OlUserPropertyType.olText, true, Type.Missing);
            _UserProperty2 = _UserProperties.Item(PropertyNames.UserProperty2);
        }

        _UserProperty1.Value = "Test Value 1";
        _UserProperty2.Value = "Test Value 2";

        _Item.Save();
    }

提前致谢。

1 个答案:

答案 0 :(得分:1)

不会通过Internet电子邮件(http://support.microsoft.com/kb/907985)发送自定义属性。