How to use MemoryStream Instead of FileStream
<p>I currently write a file to the file system and then use FileStream to offer it up as a download to a user. However, there is no need for this extra step of Document In Memory to File System to Stream. I should just go from Document In Memory to Stream. I am having a heck of a time, though figuring out how to do this. </p>

<p>Right now I am using this:</p>

<pre><code>Stream dl = new FileStream(filepath, FileMode.Open, FileAccess.Read);
</code></pre>

<p>But how to do I get <code>Stream dl</code> from the <code>DocumentFormat.OpenXml.Wordprocessing.Document caf_doc</code> that I have in memory. I think I need to use MemoryStream.</p>

<p>The trouble I am having is getting the document into the MemoryStream.</p>

<p>Any help is appreciated.</p>
