Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Table of Contents
Excerpt

WordApplication offers a variety of different options for saving your WordWriter generated document.

Note

WordApplication only supports BIFF-8 file formats: DOC, DOT. All output options are limited to these file formats.

...

To save the generated file on the server, call:

Code Block

void Save(Document doc,
	String fileName)

fileName specifies a complete physical path and file name for the generated file. WordWriter will save the file to this location. If a file with the same name exists, it will be overwritten by the new Word file.

Example

Code Block
c#
c#

WordApplication wwapp = new WordApplication();
Document doc = wwapp.Create();
wwapp.Save(doc, @"C:\Sales2003\June.doc");

...

Note

The ability to load Word files directly in Internet Explorer is disabled by default in IE 8 and higher.

Example

Code Block
c#
c#

WordApplication wwapp = new WordApplication();
Document doc = wwapp.Create();
wwapp.Save(doc,
     Page.Response,
     "file.doc",
     true);

...

Code Block
void Save(Document doc,
     OutputStream out)

Example

Code Block
c#
c#

WordApplication wwapp = new WordApplication();
Document doc = wwapp.Create();
System.IO.Stream fstream = new System.IO.FileStream (@"C:\file.doc", FileMode.Create);
wwapp.Save(doc, fstream);

...

Code Block
WordTemplate.Open(WordApplication aApp, Document aDoc)

Example

Code Block
c#
c#

WordApplication wwApp = new WordApplication();
Document doc = wwApp.Create();
WordTemplate wwTmpl = New WordTemplate();
wwTmpl.Open(wwApp, doc);