Re: Copy retained in Sent Items

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Jun 12, 11:56 am, "Ken Slovak - [MVP - Outlook]"
<kenslo...@xxxxxxxx> wrote:
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

<theMo...@xxxxxxxxx> wrote in message

news:93b18f20-299e-484d-9f57-920fa9931585@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



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 = B...@xxxxxxxx
.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- Hide quoted text -

- Show quoted text -

Hi Ken, thanks for the response. How can I set that property? I
tried the following:
objMsg.Fields.Add &H0E01000B, TRUE

I did find that objMsg.Send(false) does not retain a copy in the 'Sent
Items' but I'm curious to see how I'm messing up setting the
properties.

Thanks, Matt
.



Relevant Pages

  • Re: Hoe to send a form ?
    ... >>> Ken Slovak ... >>> Reminder Manager, Extended Reminders, Attachment Options ...
    (microsoft.public.office.developer.outlook.vba)
  • Re: How do I modify a value for each New Mail Message?
    ... Ken Slovak ... [MVP - Outlook]http://www.slovaktech.com ... Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm ...
    (microsoft.public.office.developer.outlook.vba)
  • Re: Date displayed by a calendar
    ... > Ken Slovak ... > Reminder Manager, Extended Reminders, Attachment Options ... > of the explorer's selection object. ...
    (microsoft.public.office.developer.outlook.vba)
  • Re: CDO and Folder Home Page
    ... Ken Slovak ... [MVP - Outlook]http://www.slovaktech.com ... Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm ...
    (microsoft.public.outlook.program_vba)
  • Re: Installing CDO 1.21
    ... > Ken Slovak ... Absolute Beginner's Guide to Microsoft Office Outlook 2003 ... > Reminder Manager, Extended Reminders, Attachment Options ...
    (microsoft.public.outlook.program_vba)