Example Applies To
Retrieves the decoded data of the indexed part for this message and writes it to the specified file
Syntax
Visual Basic
[Boolean =] object.WriteMessageToFile(iPartNumber As Integer, sFileName as string)
Visual C++
VARIANT_BOOL object.WriteMessageToFile(int iPartNumber, BSTR sFileName)
| Part | Description |
| object | An instance of a Message Object |
| iPartNumber | The index of the part data to retrieve. |
| sFilename | The file to write the data to |
Remarks
Pass 0(zero) as the part number to write the whole message to the file.
This is a very powerful function that parses all of the MIME Body parts. This is a great way to get the HTML and Plain-Text message parts. If the part number does not exist, an empty file is created.