Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Attaching an Addin to Send Button

Geek News

Attaching an Addin to Send Button
mschmidt18[ at ]gmail.com 1/11/2007 7:27:24 PM
Hi, I am very new to creating Outlook addins. I have a need to create
an addin that executes when the user clicks the Send button. My plugin
needs to run after the button is clicked, but before the message is
sent. At this point it needs to have an option to either send the
message or not to (preferrably to execute a different addin).

So I guess I'm really trying to figure out if this is even possible
before anything else.

I do have background in .NET

Thanks,
Matt

Re: Attaching an Addin to Send Button
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 1/12/2007 3:18:36 PM
An addin would have to start up when Outlook was started. You would not be
able to run code to trap the Item.Send event without something running.

The Send event is what you want. That has a ref Cancel argument that can be
set true to cancel the send if desired. If you wanted to run code from
within that event handler you could do so but starting up another addin for
that would be a really bad architecture. I'd put all the code in one addin.

You might want to start out by reviewing the code samples and downloadable
projects at www.outlookcode.com. There are lots of code samples and many
sample addins there that could provide a starting point for you. Samples are
available for VB.NET, C# and VSTO if you intend to use a .NET platform.

--
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


<mschmidt18[ at ]gmail.com> wrote in message
news:1168543644.011455.58940[ at ]k58g2000hse.googlegroups.com...
[Quoted Text]
> Hi, I am very new to creating Outlook addins. I have a need to create
> an addin that executes when the user clicks the Send button. My plugin
> needs to run after the button is clicked, but before the message is
> sent. At this point it needs to have an option to either send the
> message or not to (preferrably to execute a different addin).
>
> So I guess I'm really trying to figure out if this is even possible
> before anything else.
>
> I do have background in .NET
>
> Thanks,
> Matt
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net