Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Example
Stream to the client and open in MS Word

When you pass an HttpResponse object to Save, WordWriter will stream the generated Word file to the client. The browser will display a File Download dialog asking the user to open or save the file. The method's second parameter specifies a file name to display in the File Download dialog. If the method's third parameter - OpenInBrowser - is False and the user chooses to open the Word file, the file will open in Microsoft Word.

Code Block
csharp
csharp
titleC#
oWW.Save(Page.Response, "StringVarOutput.doc", false);
Code Block
vb.net
vb.net
titlevb.net
oWW.Save(Page.Response, "StringVarOutput.doc", False)
Stream to the client and open in the browser window

When you pass an HttpResponse object to Save, WordWriter will stream the generated Word file to the client. The browser will display a File Download dialog asking the user to open or save the file. The method's second parameter specifies a file name to display in the File Download dialog. If the method's third parameter - OpenInBrowser - is True and the user chooses to open the Word file, the file will open in the browser window.

Code Block
csharp
csharp
titleC#
            oWW.Save(Page.Response, "StringVarOutput.doc", true);
Code Block
vb.net
vb.net
titlevb.net
            oWW.Save(Page.Response, "StringVarOutput.doc", True)