View Single Post
  #10  
Old January 27th 09, 06:47 PM posted to microsoft.public.outlook.program_addins
YM
external usenet poster
 
Posts: 3
Default Reference to AddIn

Hi Ken,

What I'm trying to do is accessing some public functions in com add-in
created with vb6 from my add-in created using vs2005. Both of them are
shared add-ins.

My code looks like following:
Dim oAddin As Microsoft.Office.Core.COMAddIn
Dim addins As Microsoft.Office.Core.COMAddIns
addins = m_olApp.COMAddIns
oAddin = addins.Item("Test.Connect")

Or
oAddin = m_olApp.COMAddIns.Item("Test.Connect")

Above works, but when I try to access oAddin.Object, it returns 'nothing'.

I have added public function in vb6 addin like following:
Public Sub CalledFromOutside()
MsgBox "This is called from outside"
End Sub

Am I missing something?

Thanks in advance.

Y

"Ken Slovak - [MVP - Outlook]" wrote:

Using the template as is will expose that method to the outside.

How you do these things varies from VB6 to managed code. You don't have the
COM Interop getting in the way with VB6 code.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


Ads