简体   繁体   中英

Python pywin32 : in outlook how to mark an email as "Complete"

with the help of pywin32 I can read an email and mark it as read:

message.Unread = False

but I want to mark it as "Complete".

I tried to use:

message.FlagRequest = "Complete"

but didn't work either

Can someone help to achieve this.

Thanks in advance.

Finally I found out how to mark an email as complete. There is a method: MarkAsTask(MarkInterval) which Marks a MailItem object as a task and assigns a task interval for the object. "MarkInterval" is of datatype OlMarkInterval and is an enumeration:

olMarkComplete  5   Mark the task as complete.
olMarkNextWeek  3   Mark the task due next week.
olMarkNoDate    4   Mark the task due with no date.
olMarkThisWeek  2   Mark the task due this week.
olMarkToday     0   Mark the task due today.
olMarkTomorrow  1   Mark the task due tomorrow.

so for my example I just have to apply the method with interval to my email:

message.MarkAsTask(olMarkComplete)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM