Deleting sent items from outlook 2003

C

curtis888

Hi

We have some business analysis software running that sends data out to our
salespeople by e mail attatchment, the largest being 7mb. I need to be able
to delete these e mails automatically once they have been sent, firstly from
sent items and then from deleted items.

I have tried using rules but with no success.

Any help would be greatly appreciated.

Many thanks
 
N

nana

Hello Curtis,
You can also try this

Const olFolderSentMail = 5

Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")

Set objFolder = objNamespace.GetDefaultFolder(olFolderSentMail)

Set colItems = objFolder.Items

For i = colItems.Count to 1 Step - 1
colItems(i).Delete
Next


Regards,
nana
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top