make outlook add-in from vba macros?

M

Mike Wilson

I am in the process of making my first Outlook add-in and it would be really
great if you experts out there could point me in the right direction. Links
to good articles also appreciated!

What we have is basically a number of VBA macros that have evolved over
time. They are all reached through buttons in a toolbar of the Mail Message
window. We want to build a package to be able to install/uninstall all this
easily on other machines. What I have gathered so far is that I think we want
to make a COM add-in as we want to support everything from Outlook 2000 and
up.

So, my questions are:

1) Is a COM add-in the right way to go? I understand the toolbar buttons may
be a challenge in 2007, but maybe there are some acceptable alternatives to
making a ribbon extension?

2) Can I keep coding in VBA/VB? I'm a long-time C++ programmer but not
having to port the current VBA codebase to another language/environment would
be great...

3) What's the most convenient way to make an installer for the add-in? I'd
also like the toolbar and buttons created at installation.

4) What developer tools do I need? Currently installed on my machine is
Office 2003 Professional, Visual Basic 6 and Visual C++ 6. (As always, it's
good if new license purchases can be kept to a minimum.)

Best regards
Mike Wilson
 
K

Ken Slovak - [MVP - Outlook]

A COM addin is definitely the way to go. Look at the COM addin articles at
www.outloocode.com, as well as using that as an excellent resource.

You should plan on having the oldest version of Office you intend to support
installed on your development machine. Only use methods, properties and
events that are exposed in Outlook 2000 if you intend to support that
version. If you need to use a method or property exposed in a later version
if it's available use late binding and check application.Version before
trying to use those properties/methods.

You can certainly use VB6, and I'd recommend against using managed code for
trying to support anything older than Outlook 2003. The VBA code can just be
pasted into the VB6 project.

Make sure your VB6 has the latest SP's and fixes. Also study the VB6 support
article for Vista at http://msdn.microsoft.com/en-us/vbrun/ms788708.aspx.

If you have Outlook 2007 you can download my Outlook 2007/VB6 template from
http://www.slovaktech.com/outlook_2007_templates.htm and use that as the
basis for your addin. Read the article at
http://xldennis.wordpress.com/2006/12/22/using-iribbonextensibilitys-type-library-with-com-add-ins/
and get the tlb Dennis mentions and implement it in your connect class and
you can then handle the ribbon using the Outlook 2007 ribbon code in the
template.


You can use the deployment wizard to create a bloated deployment package
that installs every already installed dependency, but I wouldn't recommend
using it for installations on Vista. There's a simple version of
InstallShield (totally obsolete) in VS 6 Enterprise if you have that which
is better, but I wouldn't use that for Vista either. For Vista I'd use a
more up to date installer either from a later version of VS or a commercial
installer.

If you want to avoid the security prompts in Outlook 2000 and 2002 you might
need to use Redemption (www.dimastr.com/redemption) to work around them.
 
M

Mike Wilson

Ken Slovak - said:
A COM addin is definitely the way to go. Look at the COM addin articles at
<snip>

Thanks for all the info Ken!
A peek at the links you provided seem to reveal a lot of good stuff. Your
directions was exactly what I needed so I think I'll be able to go a long way
with this!
Thanks again, and best regards
Mike
 

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