私はカスタムのUserPropertyを作成中にMailItemに追加しようとしています。メールを送信した後にOutlook.MailItem.UserPropertyが消えます
MailItemオブジェクトに添付ファイルのHashをUserPropertyとして追加します。 次に、Outlookで新しいMailItemを開きます。
mi = olApp.CreateItem(Outlook.OlItemType.olMailItem) as Outlook.MailItem;
Outlook.UserProperties mailUserProperties = null;
Outlook.UserProperty mailUserProperty = null;
mi.Attachments.Add(file.FilePath);
mailUserProperties = mi.UserProperties;
mailUserProperty = mailUserProperties.Add("AttachementsHash", Outlook.OlUserPropertyType.olText);
mailUserProperty.Value = file.Hash;
mi.Save();
mi.Display();
私は私のメールが1 UserPropertyを持っていることがわかり送信する前にOutlookSpy使用MailItem.UserPropertiesを確認してください。
次に、Outlookで[メールを送信]をクリックし、メールをSentItemsフォルダで確認します。誰もが私のUserPropertyが消える理由を知っている場合 私はUserProperties.Countの== 0
を見ることができ、私を助け、私は私の問題を解決する努力をたくさんして:)
どのようなメッセージストアをお使いですか?名前付きプロパティのBLOBは、プロパティの値を格納するプロパティと共に(OutlookSpyのIMessageをクリックして)消えていますか? –