Programmatically setting a MailItem's followup flag to complete?

旧时模样 提交于 2019-12-10 17:15:01

问题


I'm trying to find out how to set a MailItem's followup flag to completed via VBA in Outlook 2007?

Googling returns a lot of hits for methods that were valid in Outlook 2003 and before (for example, changing the value of the MailItem's FlagStatus property, as is demonstrated in Outlook 2007 - Email Flag Status), however Microsoft overhauled flagging for OL 2007 and the FlagStatus property is no longer available in OL2007 (despite what is implied by the link above).

Does anyone know how to set the currently selected MailItem's follow-up status to completed in OL2007 VBA?

Any advice or working code would be appreciated!

planetthoughtful


回答1:


How about:

''Case sensitive
If oItem.FlagRequest = "Follow up" Then
    oItem.FlagStatus = olFlagComplete
End If

http://msdn.microsoft.com/en-us/library/aa212007(office.11).aspx
http://msdn.microsoft.com/en-us/library/aa212013(office.11).aspx

Outlook 2010 Help, my highlight

MailItem.FlagRequest Property
Returns or sets a String that indicates the requested action for a mail item.
Read/write. Version Information
Version Added: Outlook 2007

Syntax

expression.FlagRequest



来源:https://stackoverflow.com/questions/4417427/programmatically-setting-a-mailitems-followup-flag-to-complete

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!