How to copy attachments from a Public Folder in VBA

Status
Not open for further replies.

Mark Graves

New Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server 2010
I am trying to copy attachments that are on a Public Folder (non-default folder) using VBA. I have seen plenty of examples of this from your Inbox or a folder under it, but not from a Public Folder. I know the path and name of the Public Folder that i am looking to get the attachments from. Any help will be greatly appreciated. Thank you
 

Mark Graves

New Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server 2010
Here is the code i use to access a folder under my Inbox called "Temp":
Dim olFolder As Outlook.Folder
Set olFolder = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
Set olFolder = olFolder.Folders("Temp")
 

Mark Graves

New Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server 2010
Thank you much Diane, I will get it a try. I also found in the help system of outlook "How to: Obtain a Folder Object from a Folder Path". I have been able to get it to work. I passed the folder Location to a function and the function sets my Public Folder object and i able to go thru all of the emails with attachments and copy them to a folder on my computer. Only the ones that are pertaining to my Location.

Thanks again.
 
Status
Not open for further replies.
Top