Set Email Flag Status in Outlook 2007

雨燕双飞 提交于 2019-11-30 19:54:13

问题


Is there a way in Outlook 2007 to set a follow-up flag on an email object? It looks like it was supported in Outlook 2003 with .FlagStatus property, but I can't find it in 2007.


回答1:


From the outlook change notes:

For Follow Up Flags For Follow Up Flags, introduced in Microsoft Office Outlook 2003, are replaced by task flags and color categories. You no longer see colored flags in the Mail view. If you flagged items in the earlier version of Outlook to indicate that they were important or that they belonged to a particular group, you should now use color categories instead. If you used flags to indicate the time at which you were to take action on an item, you should now use task flags. This change is being made to increase the functionality of flags. With task flagging, you can place an item in the overall task management system, allowing you to see your tasks in the To-Do Bar, Daily Task List in Calendar, and in the Tasks view. By categorizing an item, you can easily scan your Inbox for categorized items, the same way that you might previously have scanned your Inbox for flagged items. You can also find categorized items in the Categorized Mail Search Folders.

So the concept of the flag changed, which is why the FlagStatus property has changed. According to this, the following should work:

Set SelectedItems = Outlook.ActiveExplorer.Selection
    For Each Item In SelectedItems
        With Item
            .ToDoTaskOrdinal = dtTaskDate
            .TaskDueDate = dtTaskDate
            .TaskStartDate = dtTaskDate
            .FlagStatus = 2
            .FlagRequest = strFlagRequest
            .Categories = strCategories
            .FlagIcon = 6
            .Save
        End With
    Next Item



回答2:


This is what http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook._mailitem.flagstatus.aspx has to say:


Dim instance As _MailItem
Dim value As OlFlagStatus

value = instance.FlagStatus

instance.FlagStatus = value


来源:https://stackoverflow.com/questions/1650851/set-email-flag-status-in-outlook-2007

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