Thread: Before Send
View Single Post
  #7  
Old October 17th 08, 03:46 PM posted to microsoft.public.outlook.program_forms
BigDubb
external usenet poster
 
Posts: 21
Default Before Send

There is no Item object in the parameters, nor understood by the class
associated to the new region.

Can you clarify further?

Again, this is not a VBA project, it is a VS2008 C# project.

"Ken Slovak - [MVP - Outlook]" wrote:

Why not try the item.Send event as I suggested originally?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"BigDubb" wrote in message
...
Ok...

The more I dig into this the more odd things react.

It appears as if the Send button on a Meeting/Appointment request fires
off
a Send Event for every recipient on the appointment.

which after thinking about it, makes sense. However, how do I get my
UserDefined variables passed into the new appointment object for each
recipient?

This is a .Net C# solution.

What I"m doing so far.

On the FormRegionShowing method I added hooked a method to the current
application object.

_appt.Application.ItemSend += new
Outlook.ApplicationEvents_11_ItemSendEventHandler( Application_ItemSend)

Then in the method the handler references I test on a local variable

if (!_Qualified)
e.Cancel;


where _Qualified is a boolean value, that is set based on other criteria
on
the form.

This feels like the correct implementation, but isn't reacting the right
way.



"BigDubb" wrote:

Another issue with this event....

If a user is attempting to cancel the request and a required value is not
set, then the send event is never executed.



"BigDubb" wrote:

Thanks.

Actually I was able to get the Application object from the
AppointmentItem
and add a handler on the ItemSend event, which is exactly what I was
looking
for.

One caveat with this though, it seems to reload the send event when a
messagebox is shown, to notify the user as to why the request can't be
sent.



Ads