Outlook 约会项目:设置“标签”
在 Outlook 2003 中,当您有日历事件时,可以选择将其标签设置为“重要”、“商务”、“个人”等,每个标签都有不同的颜色。此颜色将是您日历上预定活动的颜色。
我的问题是我不知道如何使用 AppointmentItem 更改它。我查看了对象浏览器,没有看到任何看起来与更改标签/颜色相关的内容。我通过 Access 模块访问 Outlook,并设置了代码来更改对象的主题等。
所以我想知道的是,有没有办法通过约会项目更改事件标签/颜色?如果是这样,怎么办?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您要查找的术语是该项目的类别。您可以使用类别属性对其进行修改在 AppointmentItem 对象上。它是一个字符串,因此您可以简单地将所需的值放在那里。
显示的颜色可由用户自定义,因此您最好只设置标签名称,而不要尝试为约会设置特定颜色。
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 无法设置标签颜色。为此你需要 CDO。请参阅http://www.outlookcode.com/codedetail.aspx?id=139 示例代码。
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.