Pages

Outlook 2003: Create A Button To Delete E-Mail Attachments

Every company big and small has mailbox size management issues with their users. This handy button can help drastically reduce the size of an user's mailbox. Have your users save those attachments then NUKE 'EM!

In Outlook, press Alt+F8 to bring up the Macros window. Enter a name for your macro and press the Create button.



















Highlight the new macro name and press the Ed
it button. This will open the VBA editor. Delete the sub/end sub entries with nothing between them.

Copy and paste in the following code:

Sub DeleteAttachments() Dim lngIndex As Long Dim AttachmentCount As Long Dim itm As Object Dim att As Outlook.Attachment On Error Resume Next Set itm = Application.ActiveInspector.CurrentItem If Not itm Is Nothing Then itm.Save AttachmentCount = itm.Attachments.Count For lngIndex = AttachmentCount To 1 Step -1 Set att = itm.Attachments(lngIndex) att.Delete Next End If Set itm = Nothing Set att = Nothing End Sub

Hit Ctrl+S to save, then Alt+Q to quit the editor. Open a new email, right-click in a toolbar and select Customize. In the customize window, select Macros under Categories.























Click and drag your new macro to a toolbar where you would like the button placed.

















Right-click the new button to change the name and icon, then close the customize window.









Your new button is now ready to use- a single click will delete all the attachments in the currently open email a
nd then save the email.

Blogged with the Flock Browser

1 comment: