A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Saving Attachments



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 21st 09, 07:19 PM posted to microsoft.public.outlook.program_vba
James Capper
external usenet poster
 
Posts: 1
Default Saving Attachments

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
Ads
  #2  
Old July 21st 09, 07:35 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Saving Attachments

You can use the sample code at
http://www.slovaktech.com/code_sampl...ripAttachments 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

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"James Capper" jamescapper999[at]hotmail[dot]com wrote in message
...
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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
saving all attachments where the some of the attachments have thesame name nosliwmada Outlook - General Queries 0 December 6th 07 03:48 PM
saving attachments T Outlook Express 1 April 16th 06 04:16 PM
saving attachments tom Outlook - General Queries 2 April 10th 06 05:17 PM
saving attachments andy Outlook Express 2 February 15th 06 12:51 PM
Saving Attachments Raj Mazumdar Outlook Express 14 January 22nd 06 11:40 AM


All times are GMT +1. The time now is 06:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.