This documentation is archived and is not being maintained.

Importance Property

Office 2003

OlImportance can be one of these OlImportance constants.
olImportanceHigh
olImportanceLow
olImportanceNormal

expression.Importance

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This Visual Basic for Applications (VBA) example checks if the item displayed in the topmost inspector is sent by 'Dan Wilson' with 'High' importance. If it is, then it displays a message box to the user. Before running this example, replace 'Dan Wilson' with a valid name in your address book.

Sub CheckSenderName
	Dim myOlApp As Outlook.Application
	Dim myItem As Outlook.MailItem
	Set myOlApp = CreateObject("Outlook.Application")
	Set myItem = myOlApp.ActiveInspector.CurrentItem
	If myItem.Importance = 2 And myItem.SenderName = "Dan Wilson" Then
		MsgBox "This message is sent by your manager with High importance."
	End If
End Sub
	




Show: