Class MarkAsTaskRuleAction (Outlook VBA)

The class MarkAsTaskRuleAction represents an action that marks a message as a task. To use a MarkAsTaskRuleAction class variable it first needs to be instantiated, for example


Dim mat as MarkAsTaskRuleAction
Set mat = Session.DefaultStore.GetRules(1).Actions

ActionType

Returns a constant, olRuleActionMarkAsTask, from the OlRuleActionType enumeration that indicates the type of action that is taken by the rule. Here you can find possible values for OlRuleActionType.

The task marking rule action is supported only by rules for receiving messages. For more information, see Specify Rule Actions.


Dim oraActionType As OlRuleActionType
oraActionType = Session.DefaultStore.GetRules(1).Actions.MarkAsTask.ActionType

Class

Returns an OlObjectClass constant indicating the object's class. Here you can find possible values for OlObjectClass.


Dim oocsClass As OlObjectClass
oocsClass = Session.DefaultStore.GetRules(1).Actions.MarkAsTask.Class

Enabled

Returns or sets a Boolean that determines if the rule action is enabled.

After you enable a rule, you must also save the rule by using Rules.Save so that the rule and its enabled state will persist beyond the current session. A rule is only enabled after it has been saved successfully.


Session.DefaultStore.GetRules(1).Actions.MarkAsTask.Enabled = True

FlagTo

Returns or sets a String that represents the label of the flag for the message. Read/write

Returns an error if FlagTo is an empty string.


Session.DefaultStore.GetRules(1).Actions.MarkAsTask.FlagTo =

MarkInterval

Returns or sets a constant in the OlMarkInterval enumeration that represents the interval before the task is due. Possible return values are olMarkComplete - Mark the task as complete, olMarkNextWeek - Mark the task due next week, olMarkNoDate - Mark the task due with no date, olMarkThisWeek - Mark the task due this week, olMarkToday - Mark the task due today, olMarkTomorrow - Mark the task due tomorrow.


Session.DefaultStore.GetRules(1).Actions.MarkAsTask.MarkInterval = olMarkComplete

Session

Returns the NameSpace object for the current session.

The Session property and the GetNamespace method can be used interchangeably to obtain the NameSpace object for the current session. Both members serve the same purpose. For example, the following statements perform the same function: