Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
You can get a stream from a Record or Recordset object from the Fields collection, passing the index value of -1 or the adDefaultStream constant.
The following function receives a URL to an inbox item, gets the stream, and saves it to a file.
Function ADOGetStream(strURL As String) Dim objRecord As New ADODB.Record Dim objStrm As New ADODB.Stream 'Open the record objRecord.Open strURL 'Get the Stream Set objStrm = objRecord.Fields(adDefaultStream).Value 'Save it to a file objStrm.SaveToFile "d:\stream.txt", adSaveCreateOverWrite Set objRecord = Nothing Set objStrm = Nothing End Function