View Single Post
  #6  
Old September 28th 07, 03:21 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Direction/Help required for not to save MailItems in Sent Folder

There are 2 possibilities for canceling a send. The first event is
item.Send, which fires initially when the user clicks send. That event is on
the MailItem and fires only in that item. The second event is the
Application.ItemSend event, which is an application-wide event.

In either event all you do is set Cancel = true to cancel the send
operation.

SaveSentMessageFolder takes a MAPIFolder as an argument and provides a way
of setting that one specific item to save in your folder of choice. The
property is only used after the after is sent out, so it's of no use when
cancelling a send. You could set that property to Drafts, My Old Outgoing
Mail, Sent Items, or wherever else you want.

DeleteAfterSubmit is a Boolean property that when set will delete the sent
item after it's sent out and leave no copies behind.

--
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


"PS" wrote in message
ups.com...
Ken

Thanks for the response. I now understand the Entry ID part but have
some issues with the real code implementation:

1. I looked for cancelling the Send event on the original email. Cant
seem to find any code. Can you please point this to me. I am really
having a hard time finding this.

Also I see this - myItem.SavveSentMessageFolder -- which i believe i
can use to save the email directly into the sent message folder. This
may avoid the MyItem.Save and then moving?

What do you suggest.

Thanks


Ads