ExtractFile Method

Extract an attached file from the current message.

Syntax

object.ExtractFile( FileName [, Part] )

The ExtractFile method syntax has the following parts:

Part Description
object An object expression that evaluates to an InternetMail object.
filename A string which specifies the attached file name.
part A long integer which specifies the message part.

Return Type

Integer

Remarks

The ExtractFile method extracts the attached file stored in the specified message part, storing it in a file. If the optional message Part argument is not specified, the current message part is used. To determine if the current message part contains an attachment and to determine its file name, check the value of the Attachment property. An error will be returned if the specified message part does not contain a file attachment.

This method will return value of zero if the action was successful. Otherwise, a non-zero error code is returned which indicates the cause of the failure.

See Also

Attachment Property, ExportMessage Method


Copyright © 2008 Catalyst Development Corporation. All rights reserved.