Hi Sue,
Thanks for the help, I have managed to access the new button to open a
new appointment item but it keeps accessing the drop-down part of the button
that shows the other options in the new button and dosnt create a new
appointment item.
Office.CommandBar cb =
(Office.CommandBar)m_hExplorerObj.CommandBars["Standard"];
Office.CommandBarControl cbc = (Office.CommandBarControl)cb.Controls["&New"];
cbc.Execute();
How do I get it to create a new appointment item and does it return a handle
to that appointment so I can close it again ?
Sue Mosher said:
Yes, but you can close it as soon as you get the dates from it. Unless the user has a really slow system, they shouldn't notice.
When you click on a date on the calender (the yellow cells), the
"SelectChange" event seems to get fired (it also gets fired when you select
between different mail items in your mail box and possiblely or items in
different folders aswell). I will try opening a new appointment item, reading
the date and discarding it again but will this not cause an appointment item
to flash up on the screen each time the user clicks on a differnet date in
the calender ?
:
Outlook fires no event when the user selects a date/time range. You can, however, use CommandBars methods to execute the New button from the toolbar/menu. That will create a new appointment using the user's selected date/time range. You can get the dates from that appointment and then discard it.
Hi,
I am writing a Addin for Outlook in C#. In the calender in Outlook, I am
looking to retrieve the date a user clicks on (i.e. if the user selects any
date on the calender weather it has an appointment or not). I am able to
catch the event for when the user selects a date by using the SelectionChange
event but I am not able to know what date was selected ? Is it possible to
find the date selected and if so how ? Thanks.