ViewType enumeration

ViewType enumeration

Possible values for the view mode in Microsoft Word.

Members

NameDescription
NONEThe document shall be rendered in the default view of the application.
READINGThe document shall be rendered in the default view of the application.
PAGE_LAYOUTThe document shall be opened in a view that displays the document as it will print.
OUTLINEThe document shall be rendered in a view optimized for outlining or creating long documents.
NORMALThe document shall be rendered in a view optimized for outlining or creating long documents.
WEBThe document shall be rendered in a view mimicking the way this document would be displayed in a web page.

Examples

Shows how to set a custom zoom factor, which older versions of Microsoft Word will apply to a document upon loading.

doc = aw.Document()
builder = aw.DocumentBuilder(doc)
builder.writeln("Hello world!")

doc.view_options.view_type = aw.settings.ViewType.PAGE_LAYOUT
doc.view_options.zoom_percent = 50

self.assertEqual(aw.settings.ZoomType.CUSTOM, doc.view_options.zoom_type)
self.assertEqual(aw.settings.ZoomType.NONE, doc.view_options.zoom_type)

doc.save(ARTIFACTS_DIR + "ViewOptions.set_zoom_percentage.doc")

See Also