Any advantages of VSTO instead of VB6 for Outlook add-in?

M

mattiasw

I have access both to Visual Studio 2005 Tools for Office and Visual
Basic version 6. I need to write an add-in for Outlook. I want it to be
compatible with Outlook 2000, XP, 2003 (and 2007) on Windows 2000 or
later.

The addin will be distributed and I cannot be sure that the customers
have DOTNET 2.0.

After some testing and investigation, it seems that I can solve my
problem with VB6 + redemption. Using VB6 the installation will be very
easy, just distribute the dll+redemption+register them. If I am not
mistaken vbrun is always included in Windows 2000 and later.

If I go the VSTO route, I have to distribute DOTNET 2.0 and my program,
so the installation will increase in size from 1Mb to 30 Mb. (Can VSTO
use DOTNET 1.1, which seems to be much more distributed?)

Also, if I understand the documentation properly, VSTO will have the
security dialog problem for Outlook 2000 and Outlook XP.

Are there ANY advantages using VSTO? I would like to use smart tags,
but Outlook doesn't support that anyway (except if you use Word as
editor, do users normally do that?)

Please tell my why I should use MS latest technology instead of 8 year
old VB6.
 
K

Ken Slovak - [MVP - Outlook]

VSTO is an excellent solution if you can live with the performance losses of
going through the COM Interop and you mostly want to support one version of
Outlook with a distribution. Otherwise you seem to have summed up the
advantages and disadvantages of both development platforms. I still use VB 6
for almost all of my addins, except when I need to write something for a
book that covers .NET or VSTO or if the customer absolutely insists on a
..NET addin. Your mileage may vary.
 
J

Josh Einstein

It depends on what your add in needs to do. VB6 gives you very little out of
the box and it's horrible for code reuse and application architecture. I'm
not just a VB basher either. VB was my primary language up until about 5-6
years ago when I started using C#.

For example. Do you need to access any internet resources? Do you need to
use threads? Do you need to use inheritence or customize collection classes?
Do you need cryptography? Do you need Office-style menu bars or toolbars in
custom forms? If so, VB.NET is the way to go.

If your add in is basic and mostly deals with the COM aspect of add in
development, then maybe you're better off with VB6 so you can avoid the
interop hassles of .NET.

Either way, if you need Redemption, then your choice of VB6 or .NET won't
change that. Redemption is a powerful library that provides features that
neither VB6 or .NET provides.

--
Josh Einstein
Einstein Technologies
Microsoft Tablet PC MVP
Tablet Enhancements for Outlook 2.0 - Try it free for 14 days
www.tabletoutlook.com
 
J

Jim

I use C# for my add-ins and I have had success. One thing to be careful
of is the version of the interop assembly you end up using. Be sure, and
I know this is mentioned on outlookcode.com, to use the oldest interop
assembly that you plan to release your add-in on. I have been burned on
this many times. Sometimes what this means if you need to use the
Outlook 2000 OOM and modify the interop in order to expose some methods
that may otherwise be unavailable to you. For instance .Item().
Hope this helps.
 
J

Josh Einstein

Hey Jim I did the opposite. I use the newer PIA and copy it to the app dir.
Then methods which have no corresponding COM method will fail but you can
trap it. It's imperative that you use a shim if you do this otherwise you
hose other add ins. However if he's using VSTO then none of this applies
because it only supports 2003 and shims for you anyway.

--
Josh Einstein
Einstein Technologies
Microsoft Tablet PC MVP
Tablet Enhancements for Outlook 2.0 - Try it free for 14 days
www.tabletoutlook.com
 

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