vba 在 Outlook 2007 中设置电子邮件标志状态
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1650851/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Set Email Flag Status in Outlook 2007
提问by NoahD
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.
Outlook 2007 中有没有办法在电子邮件对象上设置后续标志?看起来它在带有 .FlagStatus 属性的 Outlook 2003 中受支持,但我在 2007 年找不到它。
回答by Yishai
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.
For Follow Up Flags For Follow Up Flags 在 Microsoft Office Outlook 2003 中引入,被任务标志和颜色类别取代。您不再在邮件视图中看到彩色标志。如果您在早期版本的 Outlook 中标记项目以表明它们很重要或它们属于特定组,则现在应该改用颜色类别。如果您使用标志来指示您要对某个项目采取行动的时间,那么您现在应该使用任务标志。进行此更改是为了增加标志的功能。通过任务标记,您可以在整个任务管理系统中放置一个项目,让您可以在待办事项栏、日历中的每日任务列表和任务视图中查看您的任务。通过对项目进行分类,您可以轻松扫描收件箱中的已分类项目,与您之前扫描收件箱以查找标记项目的方式相同。您还可以在分类邮件搜索文件夹中找到分类项目。
So the concept of the flag changed, which is why the FlagStatus property has changed. According to this, the following should work:
所以标志的概念发生了变化,这就是 FlagStatus 属性发生变化的原因。根据此,下面应该工作:
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
回答by EToreo
This is what http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook._mailitem.flagstatus.aspxhas to say:
这就是http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook._mailitem.flagstatus.aspx所说的:
Dim instance As _MailItem
Dim value As OlFlagStatus
value = instance.FlagStatus
instance.FlagStatus = value