A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Before Send



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 16th 08, 08:45 PM posted to microsoft.public.outlook.program_forms
BigDubb
external usenet poster
 
Posts: 21
Default Before Send

How would one prevent sending of an appontment object if all of the required
fields haven't been completed? I cant seem to find a before send event to
trap on.

Thanks.
  #2  
Old October 16th 08, 09:11 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Before Send

That's because there isn't such an event. However, the item.Send() event
does have a Cancel argument. Set that to True and that will cancel the send.

--
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
...
How would one prevent sending of an appontment object if all of the
required
fields haven't been completed? I cant seem to find a before send event to
trap on.

Thanks.


  #3  
Old October 16th 08, 09:23 PM posted to microsoft.public.outlook.program_forms
BigDubb
external usenet poster
 
Posts: 21
Default Before Send

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.



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

That's because there isn't such an event. However, the item.Send() event
does have a Cancel argument. Set that to True and that will cancel the send.

--
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
...
How would one prevent sending of an appontment object if all of the
required
fields haven't been completed? I cant seem to find a before send event to
trap on.

Thanks.



  #4  
Old October 16th 08, 10:06 PM posted to microsoft.public.outlook.program_forms
BigDubb
external usenet poster
 
Posts: 21
Default Before Send

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.



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

That's because there isn't such an event. However, the item.Send() event
does have a Cancel argument. Set that to True and that will cancel the send.

--
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
...
How would one prevent sending of an appontment object if all of the
required
fields haven't been completed? I cant seem to find a before send event to
trap on.

Thanks.



  #5  
Old October 16th 08, 11:42 PM posted to microsoft.public.outlook.program_forms
BigDubb
external usenet poster
 
Posts: 21
Default Before Send

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.



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

That's because there isn't such an event. However, the item.Send() event
does have a Cancel argument. Set that to True and that will cancel the send.

--
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
...
How would one prevent sending of an appontment object if all of the
required
fields haven't been completed? I cant seem to find a before send event to
trap on.

Thanks.


  #6  
Old October 17th 08, 03:14 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Before Send

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.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail stuck in outbox, can't delete,won't send, retards send/rec. Great Golfer Outlook - General Queries 2 June 10th 08 06:06 PM
How do I send an email from office? I cant find a send button. jasonrock Outlook - General Queries 2 November 25th 07 05:52 PM
Some items can't be send in outlook 2003. Even after repeatly clicking the send button. baarts Outlook - General Queries 1 August 9th 06 03:52 PM
OE6 is not launching from within IE6 on New Message, Send a Link, Send Page Edward Outlook Express 6 March 12th 06 03:14 AM
File send send Link by Email problems in IE after Thunderbird Install Woody Outlook - General Queries 0 January 8th 06 01:26 AM


All times are GMT +1. The time now is 08:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.