在 Outlook 兑换中使用 GetMessageFromMsgFile 后,EntryID 为空

发布于 2024-09-18 18:30:31 字数 325 浏览 2 评论 0原文

在 Exchange 2007 SP3 上使用 RDO 4.8.0.1184 和 Delphi 2006

我有以下代码(缩写):

Msg := MailSession.GetMessageFromMsgFile(sTempFile, false);
Msg.UnRead := true;
Msg.Save;
Msg.Move(some_folder);
ShowMessage('EntryID: ' +Msg.EntryID);

结果对话框显示一个空的 EntryID。我尝试在不同的地方打印 EntryID,但它始终是一个空字符串。我做错了什么?

Using RDO 4.8.0.1184 with Delphi 2006 on Exchange 2007 SP3

I have the following code (abbreviated):

Msg := MailSession.GetMessageFromMsgFile(sTempFile, false);
Msg.UnRead := true;
Msg.Save;
Msg.Move(some_folder);
ShowMessage('EntryID: ' +Msg.EntryID);

The resulting dialogue shows an empty EntryID. I've tried printing the EntryID at various places but it is always an empty string. What am I doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

新雨望断虹 2024-09-25 18:30:31

条目 ID 仅适用于消息存储中存在的消息,消息存储负责在给定条目 ID 的情况下打开它们。
独立 MSG 文件没有 MAPI 消息存储。

或者你的意思是你需要新创建的消息的条目ID?请记住,Move 是一个返回新创建的消息的函数:

Msg = Msg.Move(some_folder);

ShowMessage('EntryID: ' +Msg.EntryID);

Entry ids are only available on the messages that exist in a message store, which is reponsible for opening them given the entry id.
There is no MAPI message store for the standalone MSG files.

Or do you mean you need the entry id of the newly created message? Keep in mind that Move is a function that returns the newly created message:

Msg = Msg.Move(some_folder);

ShowMessage('EntryID: ' +Msg.EntryID);

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文