如何将自定义属性添加到生成的iCal文件? [英] How to add custom property to generated iCal file?

查看:92
本文介绍了如何将自定义属性添加到生成的iCal文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在为Outlook 2007/2010编写一个加载项,该加载项会向约会检查器添加一个带有下拉列表的功能区。用户可以在下拉列表中选择值,并在保存约会时,将选择的值添加到约会项目
作为自定义用户属性。


 


在此之后,我设置了一个计时器,将特定日历保存为iCal格式(CalendarSharing对象的SaveAsICal方法)。


 


我的问题是,我想以某种方式将我的自定义属性添加到生成的iCal文件中。目前,我跟踪每个项目GlobalAppointmentID,然后我解析生成的iCal文件并查找每个事件的UID属性,当它们关联
时,我可以插入自定义信息。


 


经过一些测试,我发现iCal文件中的UID属性并不总是与AppointmentItem的GlobalAppointmentID相关联,例如,当我从另一个文件夹中复制项目时,iCal中的UID如下所示:


 


UID:AAAAAAp6uJlhJ8xCqt178DEgI + JEOiQA


 


而不是正常:


 


UID:040000008200E00074C5B7101A82E00800000000B03AE4407CECCB010000000000000000100000008E62AA1D98344140B1D84816A69C4062


 


有谁知道为什么?有谁知道将自定义信息添加到此iCal文件的更好方法?如果有,请帮助我!


 


 

解决方案

你好Henkeeee,


感谢您在MSDN论坛上发帖。


根据我的经验和研究,我们无法添加自定义属性由于CalendarSharing而导致CalendarSharing实例
不存在支持它的属性或方法。


祝你有个美好的一天,


汤姆


Hello, I'm writing a add-in for Outlook 2007 / 2010 which adds a ribbon with a dropdown-list to the appointment-inspector. The user can choose between values in the dropdown, and upon saving the appointment, the choosen value is added to the appointmentitem as a custom user property.

 

After this, I set a timer to save a specific calendar to iCal-format (the SaveAsICal-method for a CalendarSharing object).

 

My problem is, I want to somehow add my custom property to the generated iCal-file. At the time being, i keep track of each items GlobalAppointmentID and then I parse through the generated iCal-file and look for each events UID-property, and when they correlate I can insert the custom information.

 

After some testing, I've found that the UID-property in the iCal file isn't always correlating with the GlobalAppointmentID of the AppointmentItem, for instance when I have copied the item from another folder or such, the UID in the iCal looks like this:

 

UID:AAAAAAp6uJlhJ8xCqt178DEgI+JEOiQA

 

instead of the normal:

 

UID:040000008200E00074C5B7101A82E00800000000B03AE4407CECCB010000000000000000100000008E62AA1D98344140B1D84816A69C4062

 

Does anyone know why? Does anyone know of a better way to add my custom information to this iCal-file? If so, please help me!

 

 

解决方案

Hi Henkeeee,

Thanks for posting in the MSDN Forum.

It’s based on my experience and research, that we’re not able to add custom property to the CalendarSharing instance due to CalendarSharing doesn’t exist the property or method to support it.

Have a good day,

Tom


这篇关于如何将自定义属性添加到生成的iCal文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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