access files in public folders

  • Thread starter Thread starter maka
  • Start date Start date
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]
 
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
 
Back
Top