Outlook Appointment Item: Set the "Label"
In Outlook 2003, when you have a calendar event, it has an option to set its Label to Important, Business, Personal, etc, each having a different colour. This colour will be the colour of the scheduled event on your calendar.
My problem is I have no idea how to change it using an AppointmentItem. I've looked through the object browser and see nothing that looks 开发者_运维知识库like it relates to changing the label/colour. I'm accessing Outlook through an Access module, and have code set up to change the object's subject etc.
So what I want to know is, is there a way to change the events label/colour through an appointmentItem? And if so, how?
The term you are looking for is the item's Category. You can modify it using the Categories property on the AppointmentItem object. It's a string, so you can simply put the value you want in there.
The color displayed is customizable by the user, so you are better off just setting the label name and not try to put a specific color for the appointment.
VBA has no way to set the label color. You would need CDO for this. See http://www.outlookcode.com/codedetail.aspx?id=139 for sample code.
精彩评论