How To Remove Attachments From Emails in Outlook
I have a 500,000kb limit for my email account and my work signature with a 44kb logo included. At an average of 50 emails a day that means that in less than a year I’m over my limit due to this logo alone. I tend to hoard email and use it as a record that I can refer to later and attachments can be a critical part of that record. Therefore I’m unlikely to delete emails or archive them regularly. Sent email is a different matter since I already have any attachment on my hard drive. However I do want to keep a record of what attachment I sent. What would be perfect would be the ability to strip attachments from a group of emails while leaving a record of what attachments were removed like this…
Outlook, which I use for work email, only allows you to remove emails from an open email, meaning you can only remove them one at a time. Luckily there is a macro that will remove attachments from multiple emails at once and inserts the name of the removed attachment into the body of that email. And you can add it to the toolbar as a button. Here’s how you do it.
Note: this macro does not save the attachments it just deletes them. If you want to save the attachments you must do so separately.
1. Go to Tools > Macro > Security and select the Trusted Publishers tab to make sure that “Trust all installed add-ins and templates” is checked.
Back on the Security Level tab, select “Medium” and click “OK”. This will still protect you from unsafe macros, but let you allow this macro to be run when you want it to.
2. Go to Tools > Macro > Visual Basic Editor.
3. In the Project window in the upper left, doubleclick on “ThisOutlookSession” which will open a window on the right.
4. Paste the code for the macro, which can be found on Nicola Delfino’s blog, into the window and save.
5. Create a digital certificate. Nicola covers it in her blog, but for simplicity’s sake here it is as well. Go to start->office->Microsoft office tools->digital certificates for VBA, enter your new certificate’s name and click OK.
6. Back in Microsoft Visual Basic select Tools and Digital Signature. Click Choose, select the certificate that you just created then click OK. Back on the Digital Signature popup click OK and you are done.
At this point you can run the macro to remove attachments from the selected emails and add notation about the file that was removed. But wouldn’t it be handy if you could run this macro from the toolbar? That’s what I thought. Here’s what you do.
1. Go to Tools > Customize and click on Macros in the Categories.
2. Click on the Command Project1.ThisOutlookSession.StripAttachments and drag that to one of the toolbars in Outlook.
3. With the Customize window still open, right click on the new command which will activate the Modify Selection button.
4. Click Modify Selection and click into the window beside Name.
5. Edit the name of the Command’s button to “Strip Attachments” for example.
6. Close the window and you’re done!
To use the button, click on a message or a group of them and click the new button. The following alert will be triggered, which is ok.
Click “Yes” or if you are stripping attachments from a group of emails you may want to allow access for a few minutes so that you don’t see this alert for each email.
If that message is really killing you. Click Yes from Context Magic to get rid of the Outlook message. Personally, I just live with it.
That’s all there is to it. Enjoy!
24 Responses to “How To Remove Attachments From Emails in Outlook”
Leave a Reply
Additional comments powered by BackType















Brilliant…. works perfectly!! Thanks.
Glad to have helped. Enjoy, rate the post and spread the word!
Very useful tool, thanks!
Nice post. This is my first time I’m visiting your blog and I’ve seen some of your earlier posts too. Interesting!
Generally Ido not post on blogs, but I would like to say that this post really forced me to do so! really nice post.
Great post, while i as searching for blogs, i found yours on Yahoo , that was what i was looking for, great blog, Stumble UP
Andy – Chicago Area
Great and Excellent article post, i was looking for this information on google while i found your info, definely i Digg your blog post ! Cheers , Collin – New York
Great article. I will link back from my site. Please post more often if you have time. Thanks!
Tried it with no success. you might wanna split the code in two, the injector isnt working.
Ben – I just added this macro to my new laptop and it worked fine, BUT there are a couple of things that Nicola covers in her blog and I did not spell out. I’ve added them now.
1. Make sure that in Outlook, Tools > Macro > Security on the Trusted Publishers tab that “Trust all installed add-ins and templates” is checked.
2. Create a Digital Certificate and select it, which I describe above in steps 5 and 6 for producing the macro.
Good luck and let me know if this helps you out.
Last day we have discussed about this with one of my friends. Information that you gave cleared our questions.
24.115.217.238: Proxy not working!
Excellent, well detailed explanation, but where does the file get saved?
Milo – the macro removed and deletes the attachments, it does not automatically save them to the hard drive. If you want to save the attachments you must do so before running the macro. I state that I primarily use the macro with sent email where I already have copies of the attachment I do not specifically say that the macro does not save a copy of the attached file. I’ll add a note about that in the post.
I have modified it a bit and it is actually capable of saving attachment as files
try: extract email attachments
Margo – looks like a good add on to Outlook, have you used it and what did you think of it? Attachments Processor for Outlook is $39 and the option that I describe is free.
This is very helpful. I have been able to strip the attachments, but in your very first step “Go to Tools > Macro > Security”, I do not have anything on the Trusted Publishers tab to check. It is blank. Is that a problem? Everything seems to work.
If it’s working then I wouldn’t worry about it. Thanks for the heads up for anyone else who is missing the Trusted Publishers tab also.
Hi Thomas,
Is it mandatory to install Context Magic from: http://www.contextmagic.com/express-clickyes
for this to work?
Also, it seems that my company has disable access to creating digital certificates, is there an alternative way to get this to work?
Regardless, great guide for a very useful function.
Cheers.
No Context Magic is definitely NOT mandatory. Without it you will have to click through the Outlook message, but I personally don’t find it so burdensome so I go without.
I don’t have a workaround for digital certificates being disabled on your system. Sorry and good luck.
Bin dabei
This seems to work for me but most times it tries to save a .doc version of the email to My Documents. I don’t know why. If I just hit “cancel” nothing happens and it proceeds as normal.
Not a big problem except that I have to hit “cancel” a hundred times while cleaning out my sent items folder.
Scott – haven’t had that issue before. Let me know if you find out the issue and solution then post it for others. Thanks.