Save all attatchments in unread messages in one easy step?

T

totallygreen

Hello,
I use Outlook 2003 at work for my email. Everyday I receive about
50 or so messages that contain .pdf attachments. All the messages come
from the same group of people. Anyways I must save and rename all of
these these .pdf's every day. As you can imagine it becomes time
consuming. Does anyone know if there is a way to just save all the
attachments in unread messages to a specific folder outside of Outlook?
Currently I have 64 unread messages in my inbox. Each message has a
..pdf attatchment that I right click>save as.....
I was looking for an easier way to move all 64 .pdf attachments
without having to right click on everyone of them. I hope that makes
sense. Thanks in advance.
 
G

Guest

Here's a snippet that saves all attachments in the selected email. It could
be modified to loop through all messages in a folder, determine if they are
unread, and then save each attachment with a unique name.

Sub AttSave()
Dim myItem As Outlook.MailItem
Dim myattachments As Outlook.Attachments
Dim myIndex

Set myItem = Outlook.ActiveExplorer.Selection.Item(1)
Set myattachments = myItem.Attachments
myIndex = 1

If myattachments.Count = 0 Then
MsgBox ("Shoot, there ain't no attachments in the dadgum email you have
highlighted")
Else

ChDir ("C:\")
On Error Resume Next
MkDir (myItem.SenderName)

For Each Item In myattachments
Item.SaveAsFile "C:\" & myItem.SenderName & "\" &
myattachments.Item(myIndex).DisplayName
myIndex = myIndex + 1
Next
End If
End Sub
 
T

totallygreen

Thank you for your reply. Is that a macro that you posted? If it is
then how would I modify it to loop through all unread messages in my
inbox? If it is not a macro, then unfortunately i'm not familiar and
am probably not going to be able to figure it out. Thanks again for
you're help.
 
G

Guest

You have to identify the folder to search through, then use a For Each...Next
loop to identify whether the Unread property of each is message is set to
True. If so, then you would send the code into a loop like below to save out
all the attachments.

And, yes, that is a macro below. There are lots of great books and websites
to learn about Outlook macros, not the least of which is www.outlookcode.com.

hth
 

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