VBA Send email but do not save in sent items
Posted on 2008-10-21
I have an app which emails XLS files to a client. This works fine but we send about 150-200 200k files every day so my Sent Items folder quickly fills up with 30MB of files or so every day. I do not need these files once they have been sent so my question is:
How can I continue to send the files but for Outlook to not save the message in Sent Items. I have a search folder configured to identify these emails so I just periodically empty this folder. My code is attached below, hopefully someone can tell me a simple command to force Outlook to just send the email without saving it
Set olapp = CreateObject("Outlook.Application")
Set oItem = olapp.CreateItem(0)
.Subject = "Purchase Order: PO" & Trim(Str(numb + 1))
.To = emailaddress
.Attachments.Add "C:\PO " & Trim(Str(numb + 1)) & ".xls"
Set olapp = Nothing
Set oItem = Nothing
I am away until next Monday so if I don't respond until then thanks for your responses.