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 |
|
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. |
|