The IMAPIViewContext::GetSaveStream method retrieves a stream to be used for saving the current message.
See IMAPIViewContext : IUnknown.
HRESULT GetSaveStream(
ULONG FAR * pulFlags,
ULONG FAR * pulFormat,
LPSTREAM FAR * ppstm
);
Form objects call the IMAPIViewContext::GetSaveStream method to retrieve a stream — an object that implements the IStream interface — to support the handling of the Save As verb in the form viewer. The IMAPIForm::DoVerb method, which is implemented in the form server and called by the form viewer to invoke a verb, should not return until the message is fully converted into the appropriate text format and placed into the appropriate stream.
Do not write to the stream pointed to by ppstm before calling GetSaveStream. When GetSaveStream returns, do not reset the position of the seek pointer. This pointer must remain at the end of the saved message text.