Extract all file attachments from the current message, storing them
in the specified directory.
Syntax
object.ExtractAllFiles( [Directory] )
Parameters
- Directory
- An optional string that specifies the name of the directory
where the file attachments should be stored. If this parameter is
omitted or points to an empty string, the attached files will be
stored in the current working directory on the local system.
Return Value
If the method succeeds, the return value is the number of file
attachments which were extracted from the current message. If the
message does not contain any file attachments, this method will return
a value of zero. If the method fails, the return value is -1. To get
extended error information, check the value of the LastError
property.
Remarks
This method will extract all of the files that are attached to
the current message and store them in the specified directory. The directory
must exist and the current user must have the appropriate permissions
to create files there. If a file with the same name as the attachment
already exists, it will be overwritten with the contents of the
attachment. If the file attachment was encoded using base64 or uuencode,
this method will automatically decode the contents of the attachment.
To store a file attachment
on the local system using a name that is different than the file name
of the attachment, use the ExtractFile method.
See Also
Attachment Property,
AttachData Method,
AttachFile Method,
ExtractFile Method
|