This method will store the contents of a file attachment in the
current message part to the specified file on the local system. If a
path is specified as part of the file name, it must exist and the
current user must have the appropriate permissions to create the file.
If a file with the same name 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.
If the nMessagePart parameter is specified, then an
attachment in that message part will be stored in the specified file.
If the message part does not contain a file attachment, the method
will fail.
If the lpszAttachment parameter is specified, the method
will search the entire message for an attachment with the same file
name. The search is not case-sensitive, however it must match the
attachment file name completely. This method will not match partial
file names or names that include wildcard characters. If a match is
found, the contents of that attachment will be stored in the file
specified by the lpszFileName parameter.
To extract all of the files attached to a message in a single
method call, use the ExtractAllFiles method.