Outlook:设置“类别”后如何刷新文件夹在邮件上

发布于 2024-11-23 16:06:22 字数 373 浏览 0 评论 0原文

我编写了一些代码来解析某个文件夹中的邮件主题。解析后的内容被写入邮件对象的Categories字段。根据调试,效果很好。

现在的问题是在outlook中看不到效果。事实上,我只在大约 30 封邮件中的 5 封中看到它。在这五个类别中,邮件面板中的输出显示了正确的值。所有其他邮件在这两个区域中都没有显示任何内容。

单击每封邮件,转到另一个文件夹然后返回,双击邮件不会执行任何操作。

我需要做什么才能更新文件夹以查看所有邮件的类别?

编辑
我编写了一些仅选择当前选定邮件的代码。此代码仅在选择一封邮件时有效,即使循环涉及所有邮件。如果我选择多个邮件,则只有第一个选定的邮件可能(是的,可能)已更改。

I wrote some code to parse the subjects of mails in a certain folder. The parsed stuff gets written to the Categories-field of the mail-object. According to debugging this works nicely.

The problem now is that I do not see the effect in Outlook. Actually I only see it in five out of ~30 mails. On those five the Categories-column and the output in the mail panel present the correct value. All other mails show nothing in those two areas.

Clicking on each mail, going to another folder and then back, double-clicking a mail don't do anything.

What do I need to do to update the folder to see the categories on all mails?

EDIT:
I wrote some more code that only picks the currently selected mails. This code only works if one mail is selected even though the loop touches all mails. If I select more than one mail only the first selected mail may (yes, may) have changed.

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

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

发布评论

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

评论(1

把时间冻结 2024-11-30 16:06:22

在寻找其他内容时,我遇到了另一个 Outlook 问题并度过了一个启发性的时刻。那里的代码示例包括

Item.Save

我的代码中没有的行。我在对邮件项目进行所有操作后添加了该行,现在它可以完美地工作。它甚至适用于选择的许多邮件。

有些解决方案非常简单......

While looking for something else I ran into another Outlook-question and had an enlightening moment. The code sample there includes the line

Item.Save

which I had not in my code. I added the line after all manipulations on the mail-item and now it works flawlessly. It even works with many mails selected.

Some solutions are quite simple...

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