ShowCategoriesDialog Method

Microsoft Outlook Visual Basic

ShowCategoriesDialog Method

       

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

expression.ShowCategoriesDialog

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

Example

The following example creates a new appointment item, displays the item on the screen, and opens up the Show Categories dialog box.

Sub Appointment()
'Creates an appointment item to access Fields property
    Dim appolApp As Outlook.Application
    Dim olApptItem As AppointmentItem
    'Create an instance of the application
    Set appolApp = Outlook.Application
    'Create appointment item
    Set olApptItem = appolApp.CreateItem(olAppointmentItem)

    olApptItem.Body = "Please meet with me regarding these sales figures!"
    olApptItem.Recipients.Add ("Jeff Smith")
    olApptItem.Subject = "Low Sales Reports"
    'Display the item
    olApptItem.Display
    'Display the Show categories dialog
    olApptItem.ShowCategoriesDialog

End Sub