PostItem.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 PostItem object.

Example

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

Sub PostItem() 
 
 'Creates a post item to access ShowCategoriesDialog 
 
 Dim olmyPostItem As Outlook.PostItem 
 
 'Create post item 
 
 Set olmyPostItem = Application.CreateItem(olPostItem) 
 
 
 
 olmyPostItem.Body = "Please comment on these sales figures." 
 
 olmyPostItem.Subject = "Sales Reports" 
 
 'Display the item 
 
 olmyPostItem.Display 
 
 'Display the Show categories dialog 
 
 olmyPostItem.ShowCategoriesDialog 
 
End Sub

See also

PostItem Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.