DocumentSave(String, SaveFormat) Method |
Saves the document to a file in the specified format.
Namespace:
Aspose.Words
Assembly:
Aspose.Words (in Aspose.Words.dll) Version: 21.2.0
Syntax
public SaveOutputParameters Save(
string fileName,
SaveFormat saveFormat
)
Public Function Save (
fileName As String,
saveFormat As SaveFormat
) As SaveOutputParameters
public:
SaveOutputParameters^ Save(
String^ fileName,
SaveFormat saveFormat
)
member Save :
fileName : string *
saveFormat : SaveFormat -> SaveOutputParameters
Parameters
- fileName
- Type: SystemString
The name for the document. If a document with the
specified file name already exists, the existing document is overwritten. - saveFormat
- Type: Aspose.WordsSaveFormat
The format in which to save the document.
Return Value
Type:
SaveOutputParametersAdditional information that you can optionally use.
Examples
Shows how to convert from DOCX to HTML format.
Document doc = new Document(MyDir + "Document.docx");
doc.Save(ArtifactsDir + "Document.ConvertToHtml.html", SaveFormat.Html);
See Also