Saving Outlook attachments and links to attachments with VBA

Chris Hewitt

New Member
Outlook version
Outlook 2013 32 bit
Email Account
Exchange Server
Hello to all, I am a captain of a fairly large and active volunteer Ambulance corps just outside of a major metropolitan area.

Every few days I receive intelligence documents (as do - or should - almost all fire chiefs and peer ambulance captains in the US).

Informational ones come as PDF attachments but the really important ones come as URLs to the PDF file that expire and disappear in a few days (and some in hours).

The problem is that my day job often is so time consuming that I miss the critical PDF documents pointed to by the links.

What I could use help with is a SUB where I can pass a sender email address, Windows folder for documents to be saved in (and maybe a folder (with an option to search subfolders) or just default to the current INBOX). Then the macro will look for every email sent by that email address and save all the PDF attachments and if there is a link to a PDF file save that as well - maybe only look at unread messages to improve efficiency and speed.

Anyone able to help me out here?

Thanks!

PS. have lots of technical experience - started with VisiCalc way back when ... and now the gun for hire on Excel macro issue at a global investment bank. BUT I have no Outlook VBA experience and need this solution ASAP as I am missing too many important documents.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
The macro here - Open All Hyperlinks in an Outlook Email Message - will open all links in a message. The run a script version works in a rule - put the sender address in it.

I have other macros that can save attachments off of email - you can put them together in to one.

That will open the link and as long as you don't need to do anything else, will download the file. If you are unable to set a default for downloads, you could use clickyes to respond to the dialog.
 
Top