How Do I Button?

  • Thread starter Thread starter Todd Walton
  • Start date Start date
T

Todd Walton

I need to create a special button in Outlook 2007. When clicked it
should rewrite the subject header of the email being composed, and
then send the email. Which way should I be headed?

I was looking into VSTO for a while, but someone said it's still a
little unstable and I can't seem to find many books on it anyway.
Every book on Outlook programming in my local Borders talks
exclusively about VBA and doesn't even *mention* VSTO. So maybe I
should go with VBA?

Would this be a macro thing? Create a macro written in VBA? I think
I read somewhere that you can make a button that activates a macro.

Where's my square one?

-todd
 
Is this just for yourself? If so go with a VBA macro. If it's for
distribution then VBA is not the way to go.

VSTO is nice and interesting to work with but is a bear to get everything
just right, is limited to Office 2003 Professional or above and Office 2007
and if you support the ribbon then the code has to be developed on an
Outlook 2007 machine with VSTO 2005 SE installed. Deploying VSTO addins can
be done but is a bear to get everything exactly right, especially the
installer custom actions in SetSecurity that are needed to get the managed
code to set security correctly and be able to run.

For Outlook 2007 in an open email you would really want to handle the ribbon
unless you want to use a CommandBarButton and have it stuck in the AddIns
tab. Unfortunately if you want to do ribbon code you must use an addin, VBA
cannot be used for Outlook ribbon code.
 
Is this just for yourself? If so go with a VBA macro. If it's for
distribution then VBA is not the way to go.

It is for distribution. Is it really that hard to distribute VBA? I
have control of all machines. Could I not script installing it?
Deploying VSTO addins can be done but is a bear to get everything exactly right

So, I distributing a VBA macro is much too difficult and distributing
a VSTO addin is very difficult.
VBA cannot be used for Outlook ribbon code.

Oh. I figured I'd be able to add to the ribbon a button that runs a
macro. Hmm...

-todd
 
The story for deploying code is not something that MS has done very well.

For VBA code you would have to either export the module the code is in and
then import it on each computer or copy the entire VbaProject.OTM file
(where the VBA lives). Doing that will overwrite any macros the users
already have. Importing a module can't be scripted that I know of.

For any managed code addin you have to get the security right, among other
things. You can use a VSTO addin but you have to follow the deployment
walkthrough almost word for word and you would need a separate VSTO addin
for Outlook 2003 and for 2007 and your 2003 addin would require Office 2003
Professional or above.

If you want to do Ribbon support for Outlook your options are limited to a
managed shared addin or VSTO addin or an addin in unmanaged code using VB6
or Delphi or C++ or something like that.
 
Back
Top