开发者

Outlook AppointmentItem Write Event - how many times does it execute

开发者 https://www.devze.com 2022-12-27 15:20 出处:网络
I need to perform some activity when an appointmentitem (or specifically a meeting) is saved. What I want is once the user has filled in the info and clicks \'send\', Outlook does it\'s stuff and my

I need to perform some activity when an appointmentitem (or specifically a meeting) is saved.

What I want is once the user has filled in the info and clicks 'send', Outlook does it's stuff and my code executes once.

However what I'm finding, is that the Write event occurs 开发者_如何转开发multiple times - at least twice, sometimes more (eg in updates).

Where this is an issue for me, is that I have an object that needs to be updated before it's serialized, and I don't want to be doing the update and serialization multiple times.

Has anyone come across this issue, before and is there a better way to do this to use than appointmentitem.write?


Sounds like you want it to capture the send event of the Appointment, or build a userproperty into the item that flag if it has been procesed and then check for that on each save.

Marcus

ADDED

       Outlook.ItemEvents_Event _apptEvents = (Outlook.ItemEvents_Event)ai;
    _apptEvents.Send += new Outlook.ItemEvents_SendEventHandler(_itemClass_ItemEvents_Event_Send); 
0

精彩评论

暂无评论...
验证码 换一张
取 消