Platform SDK: Exchange 2000 Server

SaveToFile Method

[This is preliminary documentation and subject to change.]

Saves the decoded contents of a body part to a disk file.

[Visual Basic]
Sub SaveToFile(ByVal FileName as String)
[C++]
HRESULT SaveToFile(BSTR FileName);
[IDL]
HRESULT SaveToFile([in] BSTR FileName);
FileName
The full path and file name to be used for the URL for the disk file.

Remarks

Local Drive and FTP formats are supported. For local drive files you may use the "File://" prefix, thus the URL argument "File://C:\foo.txt" and "C:\foo.txt" are both legal and function identically.

"HTTP://" locations are not supported.

Example

Dim iMsg as New CDO.Message
Dim iBp as CDO.IBodyPart
Set iBp = iMsg.AddAttachment("c:\report.doc")
iBp.SaveToFile "d:\backup\report.doc"