![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi
I have done this in excel. 1- you have to make sure that you application is visible by com. 2- create an instance of your application 3- create an instance of your addin 4- using invoke method you can have access to your public property. step 2 app = new Excel.Application(); step 3 object sAddInName = "SimulationSmartClientAddIN.Connect"; object objApp_addin = app.COMAddIns.Item(ref sAddInName).Object; step 4 to set a property:SetProperty(objApp_addin, "PropertyName", Value); to get a property:SetProperty(objApp_addin, "PropertyName"); private void SetProperty(object obj, string sProperty, object oValue) { object[] oParam = new object[1]; oParam[0] = oValue; obj.GetType().InvokeMember(sProperty, System.Reflection.BindingFlags.SetProperty, null, obj, oParam); } private static object GetProperty(object obj, string sProperty) { return obj.GetType().InvokeMember(sProperty, System.Reflection.BindingFlags.GetProperty, null, obj, null); } |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add Global Contact List to email find | bxb7668 | Outlook - Using Contacts | 1 | June 28th 06 03:56 AM |
List of predefined variables | morten | Outlook - Installation | 1 | June 2nd 06 02:30 AM |
Sessions and Variables | Ian Mackenzie | Outlook and VBA | 1 | March 9th 06 03:35 PM |
Get values of custom variables from customised contact form | Michael Anderson | Outlook and VBA | 1 | February 6th 06 10:06 PM |
Add Other Peoples Contacts to Global Address List | Sue Mosher [MVP-Outlook] | Outlook - Using Contacts | 0 | January 18th 06 06:08 PM |