COM Addin problem from outside of Outlook!

D

Darren W.

When I run the following code from Outlook, it runs properly doing what it
is suppose to

but when I try to run this code from outside of outlook [either from Visual
Basic or PowerBuilder], the application crashes.

Application.COMAddIns(1).Connect

does anybody have any idea what am I missing?

Thanks in advance
 
K

Ken Slovak - [MVP - Outlook]

Application only applies to Outlook if you are running in Outlook VBA or in
an Outlook COM addin, otherwise use Set objOL =
CreateObject("Outlook.Application").

A specific addin may or may not be COMAddIns(1), it might be some other
index number. Use ComAddins(":myAddinName.Connect") instead and adjust for
your COM addin name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top