George Spears
Posts: 79
Joined: 2010-05-06
|
I need to write a reasonably simple plugin for Outlook. The purpose of the plugin is to copy attributes of user-selected appointments to a central server (totally outside of Outlook). The user would pull up their calendar, look at the appointments that have been scheduled for a given week, and then one by one, designate the appointments that they want to "copy" to a central server. It will probably be in the area of 50% of the appointments that will be chosen. There will be NO editing of the information in the appointments, simply copying certain data elements.
My question is: What would be the best way to approach this? I have not worked with Add-In Express in a while, but I seem to recall that their was a problem in determining the currently selected calendar appointment. What I would LIKE to do... extend the calendar appointment context menu so that a user can select an appointment, right click on the appointment from the calendar to get the context menu, and then choose a new menu option 'Copy To Server'. If I do that, can I determine (1) if an appointment is currently selected and (2) the various attributes of the appointment. (If so, are there are Delphi Code samples to help with this? At a minimum, how do I determine the selected calendar appointment?)
If the context menu approach will not work, what would you recommend?
Thanks,
George S |
|
Andrei Smolin
Add-in Express team
Posts: 18848
Joined: 2006-05-11
|
Hello George,
George Spears writes:
If the context menu approach will not work
It should work.
What Outlook version(s) do you need to support?
Andrei Smolin
Add-in Express Team Leader |
|
George Spears
Posts: 79
Joined: 2010-05-06
|
I need to support 2007 and later. If this will work, How do I determine which appointment/calendar etntry is the currently selected one? |
|
Andrei Smolin
Add-in Express team
Posts: 18848
Joined: 2006-05-11
|
Hello George,
As far as I remember it was a problem of finding the date interval selected. To get the item(s) selected, you retrieve Explorer.Selection. To find the date interval you used the procedure I described at https://www.add-in-express.com/forum/read.php?FID=5&TID=5641. Is this it?
In OL2007, you are given an event when the context menu is constructed. The parameters of the ItemContextMenuDisplay include the Selection object. In Outlook 2010-2013, you can handle the PropertyChanging event of the Ribbon component representing your button in that context menu. The event handler allows you to get the context, cast it to Explorer, and retrieve Explorer.Selection.
Andrei Smolin
Add-in Express Team Leader |
|