如何修改AppointmentItem.Parent对象 [英] How to modify the AppointmentItem.Parent object

查看:73
本文介绍了如何修改AppointmentItem.Parent对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从约会实例的定期约会的主服务器上设置UserProperty.

I need to set a UserProperty on a master of a recurring Appointment, from an appointment instance.

方案是: 一种.用户打开定期会议/约会的实例.
b.我的程序在约会系列的主菜单上设置了UserProperty

The scenario is: a. user opens an instance of a recurring meeting/appointment.
b. my program sets a UserProperty on the master of the appointment series

通过Parent属性很容易获得主约会,但是它是只读的.

Getting the master appointment is easy with the Parent property, however it is read-only.

如何获得对主约会的可修改引用?

How can I get a modify-able reference to the master appointment?

我要执行的代码就是这样

The code I want to execute is along these lines

Outlook.AppointmentItem masterAppointment = (Outlook.AppointmentItem)(currentAppointment.Parent);
masterAppointment.ItemProperties.Add("xxx", Outlook.OlUserPropertyType.olText);
masterAppointment.ItemProperties["xxx"].Value = aStringValue;
masterAppointment.Save();

推荐答案

是什么让您认为AppointmentItem.Parent返回只读的AppointmentItem?
致电保存时会收到错误消息吗?
如果需要添加自定义属性,请使用AppointmentItem.UserProperties.Add.

What makes you think that AppointmentItem.Parent returns a read-only AppointmentItem?
Do you get an error when you call Save?
If you need to add a custom property, use AppointmentItem.UserProperties.Add.

这篇关于如何修改AppointmentItem.Parent对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆