![]() |
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 |
#11
|
|||
|
|||
![]()
What is Test.Connect, is that the VB6 addin?
In the VB6 addin do you have something like this in your startup code in OnConnection: AddInInst.Object = Me Your CalledFromOutside() procedure in the VB6 code would also be declared as Public. Then in managed code I'd call the unmanaged code using this: oAddin.Object.CalledFromOutside() See if that works for you. -- 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 "YM" wrote in message ... 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 |
Ads |
#12
|
|||
|
|||
![]()
Hi Ken,
That solved my problem. Thank you very much! Y "Ken Slovak - [MVP - Outlook]" wrote: What is Test.Connect, is that the VB6 addin? In the VB6 addin do you have something like this in your startup code in OnConnection: AddInInst.Object = Me Your CalledFromOutside() procedure in the VB6 code would also be declared as Public. Then in managed code I'd call the unmanaged code using this: oAddin.Object.CalledFromOutside() See if that works for you. -- 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 |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
what reference do i need. why error | Dickery1 | Outlook and VBA | 2 | March 6th 08 12:01 PM |
Smarter NameSpace Reference... | DG | Outlook and VBA | 1 | October 21st 07 03:26 PM |
How to remove reference to Outlook Add-in | Richard Skilton | Outlook - Installation | 4 | July 28th 07 09:40 PM |
Problem to reference FM20.dll | Christian Havel | Add-ins for Outlook | 2 | July 13th 07 08:32 AM |
Reference Formula | ~KO | Outlook - Using Forms | 3 | February 24th 06 09:20 PM |