How to get a reference to the AppointmentItem in SaveAndClose event
-
Monday, January 14, 2013 5:50 PM
Here is my xml.
<command enabled="true" idMso="SaveAndClose" onAction="SaveToMacCalendar"/>
public void SaveToMacCalendar(IRibbonControl control, ref bool cancelDefault) { //How do I get a reference to the AppointmentItem that is currently being saved and closed? cancelDefault = false; }
Thank you, Terrence
All Replies
-
Monday, January 14, 2013 6:05 PM
IRiobbonControl.Context property will point to either Inspector or Explorer object depending on where the control is hosted.
In case of an Inspector. use Inspector.CurrentItem. In case of an Explorer, use the Explorer.Selection collection.
Dmitry Streblechenko (MVP) http://www.dimastr.com/redemption
Redemption - what the Outlook
Object Model should have been
Version 5.4 is now available!
- Edited by Dmitry Streblechenko _MVP_MVP Monday, January 14, 2013 6:06 PM
- Marked As Answer by Terrence_ Monday, January 14, 2013 8:51 PM
-
Monday, January 14, 2013 8:50 PM
Dmitry, you are great, thanks so much for your excellent answer.
Thank you, Terrence

