Attaching an Addin to Send Button

  • Thread starter Thread starter mschmidt18
  • Start date Start date
M

mschmidt18

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
 
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.
 
Back
Top