Copy A File FROM Outlook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Would anyone know how to write code to copy a file from a Outlook folder (All
Pulic Folders) I'm using Outlook 2000. I've tried using code:
(Outlook.CopyFile("outlook:\\All Public Folders.......",DestinationPath) but
I keep receiving this error: "Could not complete the operation. One or more
parameter values are not valid." Any help would be great!
 
Copy to where? You cannot do anything directly with a file stored as a freedoc in an Outlook folder until you save it as a file using the Attachment.SaveAsFile method. If you want to copy it to a local file folder, that method is all you need.
 
Then you'd need to use Attachment.SaveAsFile as I suggested. Freedocs are actually stored as attachments to normal Outlook items.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top