ShowCategoriesDialog Method

Microsoft Outlook Visual Basic

expression.ShowCategoriesDialog

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

Example

The following Microsoft Visual Basic/Visual Basic for Applications (VBA) 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 ShowCategoriesDialog
    Dim appolApp As Outlook.Application
    Dim olApptItem As Outlook.AppointmentItem
    'Create an instance of the application
    Set appolApp = New 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 = "Sales Reports"
    'Display the item
    olApptItem.Display
    'Display the Show categories dialog
    olApptItem.ShowCategoriesDialog

End Sub