Why not just set the DeleteAfterSubmit property on the Outlook mail item object objMsg?
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
<theMorse@gmail.com> wrote in message news:93b18f20-299e-484d-9f57-920fa9931585@l64g2000hse.googlegroups.com...
>I am writing some vbscript using CDO 1.21 to send an email and a copy > is always retained in the 'Sent Items' folder of the mailbox that I am > logging into. I have looked online and some people say that you have > to set the PR_DELETE_AFTER_SUBMIT to true and then delete the > PR_SENTMAIL_ENTRYID. I have had no luck. I can't seem to access the > PR_SENTMAIL_ENTRYID and when I add the PR_DELETE_AFTER_SUBMIT it seems > to do nothing. Anyone have any ideas? Thanks in advance for taking > the time to read this. > > set objApp = CreateObject("MAPI.Session") > objApp.Logon "", "", False, True, 0, True, strProfileInfo > > Set objOutbox = objApp.Outbox > Set objMsg = objOutbox.Messages.Add > Set R = objMsg.Recipients.Add > with R > .Name = BLAH@BLAH.com > .Type = 1 > .Resolve > End With > > 'Failed attempts: > 'strENTRYID = objApp.GetDefaultFolder(4).ID > 'objMsg.Fields.Add &H0E0A0102, strENTRYID > 'objMsg.Fields.Add &H0E01000B, TRUE > 'objMsg.Update > > > objMsg.Send
12 Jun 2008Copy retained in Sent Items.theMorse@gmail.com
12 Jun 2008\ Re: Copy retained in Sent Items.Ken Slovak - [MVP - O...
12 Jun 2008   \ Re: Copy retained in Sent Items.theMorse@gmail.com
12 Jun 2008      \ Re: Copy retained in Sent Items.Ken Slovak - [MVP - O...
All times are in (US) Eastern Daylight Time (GMT -4:00)