how to build a COM add-in with VB express ?

C

cedric

Hello all,

I am currently (and desperately) trying to build an Outlook add-in, as a
freeware, that can be installed by any interested user.
As this is a freeware, I don't intend to spend money on any development
tool, so I am only using VB Express. Therefore, I don't have access to the
setup projects, but that's not my main concern at the moment.

In order to build the COM add-in, I tried to build a simple add-in based on
the Microsoft explanations there:
http://support.microsoft.com/kb/302896/en-us
I created the project, implemented IDTExtensibility2 (copy/paste of the
given code), got a strong name and ProgID, added missing declarations of
applicationObject and addInInstance, built my project, successfully
registered it with Regasm.exe, launched outlook and.... nothing. :(
according to Outlook feedbacks in tbe COM add-ins mgt dialog, my add-in
didn't load properly (usual failure message).
I have searched for the name of my DLL in the registry, but didn't find
anything. So I guess Outlook simply can't find it neither !

Do you have any idea of what I have done wrong?

Thank you in advance!
 
K

Ken Slovak - [MVP - Outlook]

Someone can correct me if I'm wrong, but I don't believe that COM addins
using VB Express are supported.
 
C

cedric

Ken Slovak - said:
Someone can correct me if I'm wrong, but I don't believe that COM addins
using VB Express are supported.

Hi Ken, and thanks for your involvement.

I believe it is possible to build COM add-ins in VB Express, as the assembly
information dialog has a checkbox "Make the assembly visible for COM".
Still, everything must be done manually, so I guess it's easy to miss
something.

cheers

Cedric.
 
C

cedric

I got it!

on the page linked in the first post, it is said that one has to register
the COM add-in with RegAsm.exe.
By the way, this exe is in the Framework directory, usually in
c:\Windows\Microsoft.Net\Framework\v2.0.50727\
The thing is, you have to register it with the codebase option:
RegAsm MyCOM.dll /codebase

Actually, I registered my component twice: once without the option and once
with it. So I'm not sure whether both are required or not.

Anyway, it works!

cheers!
 

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