-->

Programmatically setting a MailItem's followup

2019-06-28 05:35发布

问题:

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