This documentation is archived and is not being maintained.

OlRuleConditionType Enumeration

Specifies the type of rule condition or exception condition of a rule.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

public enum OlRuleConditionType

Member nameDescription
olConditionUnknownUnrecognized condition.
olConditionFromSender is in the recipient list specified in _ToOrFromRuleCondition.Recipients.
olConditionSubjectSubject contains words specified in TextRuleCondition.Text.
olConditionAccountAccount is the account specified in _AccountRuleCondition.Account.
olConditionOnlyToMeMessage is sent only to me.
olConditionToMy name is in the To box.
olConditionImportanceMessage is marked with the specified level of importance.
olConditionSensitivityMessage is marked with the specified level of sensitivity.
olConditionFlaggedForActionMessage is flagged for the specified action.
olConditionCcMessage has my name in the Cc box.
olConditionToOrCcMessage has my name in the To or Cc box.
olConditionNotToMessage does not have my name in the To box.
olConditionSentToSent to recipients (To, Cc) are in the recipient list specified in ToOrFromRuleCondition.Recipients.
olConditionBodyBody contains words specified in _TextRuleCondition.Text.
olConditionBodyOrSubjectBody or subject contains words specified by TextRuleCondition.Text.
olConditionMessageHeaderMessage header contains words specified in TextRuleCondition.Text.
olConditionRecipientAddressRecipient address contains words specified in TextRuleCondition.Text.
olConditionSenderAddressSender address contains words specified in TextRuleCondition.Text.
olConditionCategoryCategory is the category specified in _CategoryRuleCondition.Categories.
olConditionOOFMessage is an out-of-office message.
olConditionHasAttachmentMessage has one or more attachments.
olConditionSizeRangeMessage size is between x and y in units of KB, where x and y are Integer values.
olConditionDateRangeMessage was received between x and y, where x and y are Date values.
olConditionFormNameMessage uses the form specified in _FormNameRuleCondition.FormName.
olConditionPropertyDocument property is exactly, contains, or does not contain specified properties.
olConditionSenderInAddressBookSender is in the address list specified in AddressRuleCondition.Address.
olConditionMeetingInviteOrUpdateMessage is a meeting invitation or update.
olConditionLocalMachineOnlyRule can run only on the local machine.
olConditionOtherMachineRule can run only on a specific machine that is not the current machine.
olConditionAnyCategoryMessage is assigned to any category.
olConditionFromRssFeedMessage is generated from a specific RSS subscription.
olConditionFromAnyRssFeedMessage is generated from any RSS subscription.

The list of rule condition types in this enumeration includes all the rule conditions and exception conditions that the Rules and Alerts Wizard supports. Note that while you can programmatically enumerate all the rule conditions and exception conditions for a rule, you can programmatically create a rule with only the most commonly used conditions. For more information, see Specifying Rule Conditions.

For example, the rule condition types olConditionDateRange and olConditionSizeRange are supported only for enumeration and enabling or disabling in an existing rule. You cannot programmatically create a rule with such conditions. You cannot programmatically get or set the values of x and y that represent the range.

Show: