PC Review


Reply
Thread Tools Rate Thread

Any way to prevent new message from being sent

 
 
Ben Kalegin
Guest
Posts: n/a
 
      25th Sep 2003
Hello All,

Does anybody know any (cdo/mapi/redemption) way to block the new message
being sent?
I am required following scenario:

1. User clicks New Mail
2. Com Addin creates custom controls
3. Clicks, typpings, selection and other business specific
4. User press "Send Mail". This event is handled, multiple emails are
created using redemption for access to original mail fields.
Then the original email should be discarded. If I set Cancel = True in
either MailItem.OnSend or App.OnItemSend, all my manual emails are discarded
too.
If I set Cancel = False, then original email goes to outbox and delivered.
I have try to intercept email in Folder(Outbox).Items.OnAdd using Move or
Delete, but this cause internal outlook exception.

Any Ideas?

P.S. Solution must be compatible with Outlook 2K & Ootlook2K2, IMO mode


 
Reply With Quote
 
 
 
 
Dmitry Streblechenko
Guest
Posts: n/a
 
      25th Sep 2003
When you process Application.ItemSend event, are you sure you only set
Cancel = true for the original e-mail, and not for the other e-mails?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"Ben Kalegin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello All,
>
> Does anybody know any (cdo/mapi/redemption) way to block the new message
> being sent?
> I am required following scenario:
>
> 1. User clicks New Mail
> 2. Com Addin creates custom controls
> 3. Clicks, typpings, selection and other business specific
> 4. User press "Send Mail". This event is handled, multiple emails are
> created using redemption for access to original mail fields.
> Then the original email should be discarded. If I set Cancel = True in
> either MailItem.OnSend or App.OnItemSend, all my manual emails are

discarded
> too.
> If I set Cancel = False, then original email goes to outbox and delivered.
> I have try to intercept email in Folder(Outbox).Items.OnAdd using Move or
> Delete, but this cause internal outlook exception.
>
> Any Ideas?
>
> P.S. Solution must be compatible with Outlook 2K & Ootlook2K2, IMO mode
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
prevent message Jack Sons Microsoft Excel Misc 2 22nd Feb 2009 04:57 PM
prevent e-mail message recipients automatically forward a message =?Utf-8?B?SUg=?= Microsoft Outlook Form Programming 3 1st Nov 2006 09:00 PM
prevent error message =?Utf-8?B?Z2VlYmVl?= Microsoft Excel Programming 2 5th Sep 2006 06:52 PM
Prevent Error Message =?Utf-8?B?cGhpbA==?= Microsoft Excel Programming 3 26th Jan 2005 06:48 PM
Prevent message from being Archived...? Kenneth Microsoft Outlook 6 23rd Feb 2004 03:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:31 PM.