Unfortunately, this is just not possible.
With Office Interop, there is NO way to use such methods (Open
, SaveAs
) with something else than a valid file (so it must exist or be saved on the disk or somewhere else).
What you need to keep in mind, is that Interop allows you to do at most what you could do with the Office application itself. And there is currently no way to work with MemoryStream
with Office Application, just existing files.
Working with MemoryStream
is possible with OpenXML SDK. Unfortunately, OpenXml SDK does not provide method to convert to Rtf format.
See also: How can I form a Word document using stream of bytes