共用方式為


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 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

Applies to | AppointmentItem Object | ContactItem Object | DistListItem Object | DocumentItem Object | JournalItem Object | MailItem Object | MeetingItem Object | PostItem Object | RemoteItem Object | ReportItem Object | TaskItem Object | TaskRequestAcceptItem Object | TaskRequestDeclineItem Object | TaskRequestItem Object | TaskRequestUpdateItem Object