CopyFile Method
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Copies a file from a specified location into Microsoft Outlook's store and returns an Object representing the copied document.
expression.CopyFile(FilePath, DestFolderPath)
expression Required. An expression that returns an Application object.
FilePath Required String. The path name of the object you want to copy.
DestFolderPath Required String. The location you want to copy the file to.
Example
The following example copies a file from the user's hard drive to a folder in the user's Inbox.
Sub Copy()
Dim olApp As Application
Dim docWebpg As Object
Set olApp = Outlook.Application
Set docWebpg = olApp.CopyFile("C:\ftp\Index.htm", "Inbox\test")
End Sub