Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / September 2003

Tip: Looking for answers? Try searching our database.

Any way to prevent new message from being sent

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ben Kalegin - 25 Sep 2003 11:52 GMT
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
Dmitry Streblechenko - 25 Sep 2003 23:40 GMT
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

> Hello All,
>
[quoted text clipped - 17 lines]
>
> P.S. Solution must be compatible with Outlook 2K & Ootlook2K2, IMO mode
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.