Remove Attachments from Microsoft Outlook

Many enterprise IT shops these days are significantly limiting mailbox sizes for their employees. It seems rather odd given the cost of storage, but none the less something many of us deal with. It means we’re constantly killing time each day cleaning up attachments and archiving mail. I shared my displeasure with a colleague of mine, James K. and he quickly created a Microsoft Outlook macro to automatically remove attachments. This feature should be a part of Outlook, but in the mean time, it saves me from opening each email individually to remove attachments (Outlook has no bulk processing feature for this).
Below is the macro that you can add to your own Outlook application:
——————————————————————-
Sub RemoveAttachments()
Dim selectedMailItem As Outlook.MailItem
Dim currentAttachment As Outlook.Attachment
Dim i As Integer
For Each selectedMailItem In ThisOutlookSession.ActiveExplorer.Selection
‘Remove attachments until there are none left
While selectedMailItem.Attachments.Count > 0
selectedMailItem.Attachments.Remove (1)
Wend
selectedMailItem.Save
Next
End Sub
——————————————————————-
Updated 9/24/07: Remove Attachments from Appointments
Sub RemoveAppointmentAttachments()
Dim selectedAppointmentItem As Outlook.AppointmentItem
Dim currentAttachment As Outlook.Attachment
Dim i As Integer
For Each selectedAppointmentItem In ThisOutlookSession.ActiveExplorer.Selection
‘Remove attachments until there are none left
While selectedAppointmentItem.Attachments.Count > 0
selectedAppointmentItem.Attachments.Remove (1)
Wend
selectedAppointmentItem.Save
Next
End Sub

Leave a Reply