Purge empty Ms Outlook Folders with VBA

I was recently spotted an opportunity to flex my VBA muscles when Richard Tubb posted a tweet, asking for solutions on how to clear out unused Microsoft Outlook folders.

I decided to accept the challenge, and threw together the following VBA Sub

As you can see from the code, this sub does exactly what is required. However, Richard threw me a bit of a curve ball and asked for it to be modified to allow the end user to choose there own folder to scan. Which is when I went back to the drawing board and came up with his little number:

This variation pops up Microsoft’s own ‘Folder Chooser’ allowing the user to choose their own starting point.

Hopefully someone will find this snippet useful.

Should you require assistance implementing this script, or modifying it please feel free to get in touch.

Mike Hudson

Mike Hudson is a Infrastructure Analyst living and working in Kingston Upon Hull. With extensive experience in Microsoft and Apple technologies, ranging from desktop OS’s to Server OS’s and hardware. By day working as part of an infrastructure team, and by night ridding the world of IT issues through blog posts..

%d bloggers like this: