SaveFormat enumeration

SaveFormat enumeration

Indicates the format in which the document is saved.

Members

NameDescription
UNKNOWNDefault, invalid value for file format.
DOCSaves the document in the Microsoft Word 97 - 2007 Document format.
DOTSaves the document in the Microsoft Word 97 - 2007 Template format.
DOCXSaves the document as an Office Open XML WordprocessingML Document (macro-free).
DOCMSaves the document as an Office Open XML WordprocessingML Macro-Enabled Document.
DOTXSaves the document as an Office Open XML WordprocessingML Template (macro-free).
DOTMSaves the document as an Office Open XML WordprocessingML Macro-Enabled Template.
FLAT_OPCSaves the document as an Office Open XML WordprocessingML stored in a flat XML file instead of a ZIP package.
FLAT_OPC_MACRO_ENABLEDSaves the document as an Office Open XML WordprocessingML Macro-Enabled Document stored in a flat XML file instead of a ZIP package.
FLAT_OPC_TEMPLATESaves the document as an Office Open XML WordprocessingML Template (macro-free) stored in a flat XML file instead of a ZIP package.
FLAT_OPC_TEMPLATE_MACRO_ENABLEDSaves the document as an Office Open XML WordprocessingML Macro-Enabled Template stored in a flat XML file instead of a ZIP package.
RTFSaves the document in the RTF format. All characters above 7-bits are escaped as hexadecimal or Unicode characters.
WORD_MLSaves the document in the Microsoft Word 2003 WordprocessingML format.
PDFSaves the document as PDF (Adobe Portable Document) format.
XPSSaves the document in the XPS (XML Paper Specification) format.
XAML_FIXEDSaves the document in the Extensible Application Markup Language (XAML) format as a fixed document.
SVGSaves the document in the Svg (Scalable Vector Graphics) format.
HTML_FIXEDSaves the document in the HTML format using absolutely positioned elements
OPEN_XPSSaves the document in the OpenXPS (Ecma-388) format.
PSSaves the document in the PS (PostScript) format.
PCLSaves the document in the PCL (Printer Control Language) format.
HTMLSaves the document in the HTML format.
MHTMLSaves the document in the MHTML (Web archive) format.
EPUBSaves the document in the EPUB format.
AZW3Saves the document in the AZW3 format.
MOBISaves the document in the MOBI format.
ODTSaves the document as an ODF Text Document.
OTTSaves the document as an ODF Text Document Template.
TEXTSaves the document in the plain text format.
XAML_FLOWBeta. Saves the document in the Extensible Application Markup Language (XAML) format as a flow document.
XAML_FLOW_PACKBeta. Saves the document in the Extensible Application Markup Language (XAML) package format as a flow document.
MARKDOWNSaves the document in the Markdown format.
XLSXSaves the document as an Office Open XML SpreadsheetML Document (macro-free).
TIFFRenders a page or pages of the document and saves them into a single or multipage TIFF file.
PNGRenders a page of the document and saves it as a PNG file.
BMPRenders a page of the document and saves it as a BMP file.
EMFRenders a page of the document and saves it as a vector EMF (Enhanced Meta File) file.
JPEGRenders a page of the document and saves it as a JPEG file.
GIFRenders a page of the document and saves it as a GIF file.
EPSRenders a page of the document and saves it as an EPS file.

Examples

Shows how to convert from DOCX to HTML format.

doc = aw.Document(MY_DIR + "Document.docx")

doc.save(ARTIFACTS_DIR + "Document.convert_to_html.html", aw.SaveFormat.HTML)

See Also