Saving Attachments

  • Thread starter Thread starter James Capper
  • Start date Start date
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
 
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
 
Back
Top