-
how to save every attachment in every folder to hard drive
im close, but not there yet in trying to get this code to work.
i'm trying to get all attachments in every folder to a folder on my hard drive.
would like it to search subfolders of inbox along with folders that could have been created along side with the inbox, sent ect ect
here is my code so far
[VBA]
Sub Getatth()
Set MAPI = Outlook.GetNamespace("MAPI")
Set TopFolder = MAPI.Folders.Item("Mailbox - John Doe")
Set InboxFolder = TopFolder.Folders.Item("Inbox")
For Each myItem In InboxFolder.Items
For Each att In myItem.Attachments
att.SaveAsFile "C:\attch\" & att.FileName
Next
Next
End Sub
[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules