Saving Attachments

J

James Capper

Hi,

I have a few hundred emails with excel attachments that I want to save to a specified location on my PC. Is there a VBA script I can run that will search through emails in a particular folder and do this without me doing them 1 by 1?

Judging by some of the topics on here I think it could be straight forward but I'm a total newbie so who knows!

Cheers.
Submitted using http://www.outlookforums.com
 
K

Ken Slovak - [MVP - Outlook]

You can use the sample code at
http://www.slovaktech.com/code_samples.htm#StripAttachments as a model. If
this is running in the Outlook VBA project just use Application instead of
creating an Application object.

For all items in the current folder substitute this:

Dim colItems As Outlook.Items
Set colItems = objOL.ActiveExplorer.CurrentFolder.Items

For Each objMsg In colItems


For this:

Set objSelection = objOL.ActiveExplorer.Selection

For Each objMsg In objSelection
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top