Karthick V

Hi,

I have created the outlook 2003 COM addin using Microsoft Visual Studio 2005. I created with New-> Project -> Other Projects -> Extensibility-> Shared Addin.

I coded the connect class such that on Clicking a Custom Command Bar button "Check Availability". User is shown a form to enter the name of the person/room and the time period to find whether the person/room is free or busy during the period.

InOrder to access the free/ busy information of the persion I use GetFreeBusy(...) method as follows.

I know that "this.application()" refers to the COM addin in Connect.cs ( Correct Me if I' m wrong ), But I dont know how to refer to the COM addin object in the form file say CheckAvailabilityForm.cs

OL.Application objApp = <how to refer to the active addin >

OL.NameSpace objNameSpace = objApp.GetNamespace("MAPI");

OL.AddressLists objAddressLists = objNameSpace.AddressLists;

OL.AddressEntries objAddressEntries = objAddressLists["Global Address List"].AddressEntries;

freeBusy = objAddressEntries[strName].GetFreeBusy(startDate, 60, true);

I appreciate if some could help me in this regard.

Thanks,

Karthick.



Re: Visual Studio Tools for Office While developing an Outlook 2003 addin How to refer to the COM addin object in the form files.

Karthikeya Pavan Kumar .B

Check this How to build an Office COM add-in by using Visual C# .NET






Re: Visual Studio Tools for Office While developing an Outlook 2003 addin How to refer to the COM addin object in the form files.

Karthick V

The information provided there was useful but It would be great if someone could help me access the COM / application object in the connect.cs to the file CheckAvailabilityForm.cs (or to any form file) As I have asked in Update#1.

Thanks,

Karthick.





Re: Visual Studio Tools for Office While developing an Outlook 2003 addin How to refer to the COM addin object in the form files.

Ji Zhou ĘC MSFT

Hi,

You can change the applicationObject field in Connect.cs to public static object type. And then in yourForm.cs source file, you can refer it as Connect.applicationObject.

Thanks

Ji