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
Description

Excerpt

Writes a Document to a file.

Signature
C#
C#
 public void Save(Document doc, System.String fileName)
Signature
vb.net
vb.net
Public Sub Save(ByVal doc As Document, ByVal fileName As String)
Parameters
Param
doc
doc

The Document to save.

Param
fileName
fileName

The full filename to save the Document to.

Exceptions
Exception
System.Exception
System.Exception

Thrown if there is an error saving the file.

Remarks

The WordApplication.Preserve property is used to specify the way WordWriter will save the document. When the preserve property is set to true, WordWriter attempts to preserve all formatting and features that it doesn't directly support. This includes Fields, Footnotes, Hyperlinks, Comments, and Anchored Images. When the preserve property is false, only those features directly supported by WordWriter will be preserved. This includes all Tables, Lists, Headers and Footers.

Example
Code Block
csharp
csharp
titleC#

          app.Preserve = true;
          app.Save(doc, "@C:\sample.doc");
        
Code Block
vb.net
vb.net
titlevb.net

          app.Preserve = True
          app.Save(doc, "C:\sample.doc")