Access appointment

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

Access appointment
How to get appointments organisator? 
Christian Havel




Posts: 181
Joined: 2010-12-30
Hi,

with the following code I can read the name of the organizer of the current selected appointment:

Outlook.AppointmentItem appointMent = null;
try
{
appointMent = OutlookApp.ActiveExplorer().Selection.Item(1) as Outlook.AppointmentItem;
var organizer = appointMent.Organizer;

}
catch (Exception)
{
}
finally
{
if (null != appointMent) Marshal.ReleaseComObject(appointMent);
}

Well, how do I get the organizaros properties e.g. the phonenumbers?
Thanks
Christian
Posted 25 Jan, 2011 10:11:19 Top
Eugene Astafiev


Guest


Hi Christian,

OutlookApp.ActiveExplorer().Selection.Item(1)


First of all, please note that you don't release underlying COM objects (an active explorer object and selection objects). You can read more about this in the http://www.add-in-express.com/creating-addins-blog/2008/10/30/releasing-office-objects-net/ article on our technical blog.

Please try to search the organizer in the list of recipients (see the Recipients property of the AppointmentItem class in Outlook). By the way, the http://www.add-in-express.com/docs/net-office-tips.php#getting-help states the following:

To get assistance with host applications?Â?Ð?é objects, their properties, and methods as well as help info, use the Object Browser. Go to the VBA environment (in the host application, choose menu Tools | Macro | Visual Basic Editor or just press {Alt+F11}), press {F2}, select the host application in the topmost combo and/or specify a search string in the search combo. Select a class /property /method and press {F1} to get the help topic that relates to the object.
Posted 25 Jan, 2011 10:53:24 Top