MailItem.ShowCategoriesDialog Method (Outlook)

Displays the Show Categories dialog box, which allows you to select categories that correspond to the subject of the item.

Syntax

expression .ShowCategoriesDialog

expression A variable that represents a MailItem object.

Example

The following Microsoft Visual Basic for Applications (VBA) example creates a new mail item, displays the item on the screen, and opens up the Show Categories dialog box.

Sub MailItem() 
 
 'Creates a mail item to access ShowCategoriesDialog 
 
 Dim olmyMailItem As Outlook.MailItem 
 
 'Create mail item 
 
 Set olmyMailItem = Application.CreateItem(olMailItem) 
 
 
 
 olmyMailItem.Body = "Can you help me with these sales figures." 
 
 olmyMailItem.Recipients.Add ("Jeff Smith") 
 
 olmyMailItem.Subject = "Sales Reports" 
 
 'Display the item 
 
 olmyMailItem.Display 
 
 'Display the Show categories dialog 
 
 olmyMailItem.ShowCategoriesDialog 
 
End Sub 
 

See Also

Concepts

MailItem Object

MailItem Object Members