Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   How Do I Button? (http://www.outlookbanter.com/outlook-vba/52392-how-do-i-button.html)

Todd Walton July 12th 07 05:15 PM

How Do I Button?
 
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


Ken Slovak - [MVP - Outlook] July 12th 07 07:11 PM

How Do I Button?
 
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Todd Walton" wrote in message
ups.com...
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



Todd Walton July 17th 07 03:30 PM

How Do I Button?
 
On Jul 12, 1:11 pm, "Ken Slovak - [MVP - Outlook]"
wrote:
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



Ken Slovak - [MVP - Outlook] July 18th 07 01:59 PM

How Do I Button?
 
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Todd Walton" wrote in message
ups.com...
On Jul 12, 1:11 pm, "Ken Slovak - [MVP - Outlook]"
wrote:
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





All times are GMT +1. The time now is 02:49 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com