A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Reference to AddIn



 
 
Thread Tools Search this Thread Display Modes
  #11  
Old January 27th 09, 10:56 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Reference to AddIn

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  
Old January 27th 09, 11:44 PM posted to microsoft.public.outlook.program_addins
YM
external usenet poster
 
Posts: 3
Default Reference to AddIn

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 07:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.