Possible to capture highlighted calender date/time range?

Add-in Express™ Support Service
That's what is more important than anything else

Possible to capture highlighted calender date/time range?
 
Jon Sutter




Posts: 4
Joined: 2006-10-21
Is it possible to capture the highlighted calender date/time range? I'm able to capture selected item and folder events so I can determine when the user is within the calendar and/or when a given calendar item (appointment) is selected.

What I want to do is on a given button click, determine if the user has a selected day/time range within their calendar and read the corresponding start date/time and end date/time?

Jon
Posted 21 Oct, 2006 14:19:59 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Jon.

Unfortunately the Outlook Object Model doesn't provide such possibility.
Posted 23 Oct, 2006 09:15:24 Top
Jon Sutter




Posts: 4
Joined: 2006-10-21
Thanks, I thought they may be the case.

I was able to "fake" it by creating an appointment (making sure to disable the reminder), read the date/time range, and then deleting the appointment. Kind-of a kludge, but it works.


							
activeInspector = OutlookApp.ActiveInspector();				
if ( activeInspector != null )
{
   olAppoint = (InteropOutlook.AppointmentItem)activeInspector.CurrentItem;
   olAppoint.ReminderSet = false;
   olAppoint.Save();
   activeInspector.Close(InteropOutlook.OlInspectorClose.olSave);
   string start = olAppoint.Start.ToString();
   string end = olAppoint.End.ToString();
   string message = ": " + start + "
End: " + end;
   MessageBox.Show(message, AddinName);
   olAppoint.Delete();
}
Posted 25 Oct, 2006 17:09:54 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Jon.

Yes, I agree with your solution.
Posted 26 Oct, 2006 08:19:22 Top