access files in public folders

M

maka

I've stored a xml-file in public folders. how can i access the file
programaticaly? What kind of OLItemType has the Item?

I tried to access the file as follows:
<NameSpace>.Folders["Public Folders"].Folders["the Folder"].Items[1]
 
S

Sue Mosher [MVP-Outlook]

Such "freedocs" will be DocumentItem objects, with the file held in the DocumentItem.Attachments collection. You must use the Attachment.SaveAsFile method to save the attachment to the local drive before you can do anything with it, e.g.:

On Error Resume Next
Set objItem = myNameSpace.Folders("Public Folders").Folders("the Folder").Items(1)
objItem.Attachments(1).SaveAsFile "C:\" & objItem.Attachments(1).FileName
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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