Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

Categories Property

Office 2003

Returns or sets a String representing the categories assigned to the Microsoft Outlook item. Read/write.

expression.Categories

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, displays the appointment on the screen, and opens the Show Categories dialog box. Finally, it displays the categories that the user assigned using ShowCategoriesDialog. Replace 'Dan Wilson' with a valid recipient name before running the example.

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

    olApptItem.Body = "Please meet with me regarding these sales figures."
    olApptItem.Recipients.Add ("Dan Wilson")
    olApptItem.Subject = "Sales Reports"
    'Display the appointment
    olApptItem.Display
    'Display the Show Categories dialog box
    olApptItem.ShowCategoriesDialog
    MsgBox olApptItem.Categories
End Sub


		




Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.