Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (MemoryStream ms = new MemoryStream())
- {
- doc.SaveAs(ms);
- Response.Clear();
- Response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}", fileName));
- Response.ContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
- ms.WriteTo(Response.OutputStream);
- Response.End();
- }
Add Comment
Please, Sign In to add comment