开发者

Outlook: How to refresh folder after setting "Categories" on mails

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开发者_C百科. 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.


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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜