Description
Writes a Document to a file.
C#
public void Save(Document doc, System.String fileName)
vb.net
Public Sub Save(ByVal doc As Document, ByVal fileName As String)
Parameters
doc
TheDocument to save.
fileName
The full filename to save theDocument to.
Exceptions
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 thepreserve 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.
Examples
C#
app.Preserve = true;
app.Save(doc, "@C:\sample.doc");
vb.net
app.Preserve = True
app.Save(doc, "C:\sample.doc")
