Not saving attachments in the Sent Folder

Status
Not open for further replies.

skybluekid

Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
Hi All, I use excel 2010 to send files via email. What I want to do it not have copies being saved in the Outlook Sent folder. I know that you can uncheck the option in Options to not save copies of normal mails, but can this be done for mails with attachments. Any ideas would be welcome. Thank you in advance
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
It's not an outlook option (eg, there is no "Don't save sent message if has attachment" option) but you could use a macro to watch for sent items and delete them if there is an attachment.

Use the basic code found at http://www.slipstick.com/outlook/email/set-an-expiration-date-on-all-messages-you-send/ and replace the itemadd code with one that checks for attachments. If i have a chance this evening, I'll put something together.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
A very basic macro would be this - it just checks for attachments, then attachment sizes, and deletes. This allows you to use small images in your signature. You could also check the subject or file name and only delete certain messages.

Private Sub sentMsg_ItemAdd(ByVal Item As Object)
Dim oAtt As Attachment

If Item.Attachments.Count > 0 Then

For Each oAtt In Item.Attachments
If oAtt.Size > 5200 Then
Item.Delete
' Exit Sub
End If

Next oAtt

End If

End Sub
 
Status
Not open for further replies.
Top