ViewOptionsViewType Property

Controls the view mode in Microsoft Word.

Namespace:  Aspose.Words.Settings
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public ViewType ViewType { get; set; }

Property Value

Type: ViewType
Remarks

Although Aspose.Words is able to read and write this option, its usage is application-specific. For example MS Word 2013 does not respect the value of this option.

Examples
Shows how to make sure the document is displayed at 50% zoom when opened in Microsoft Word.
Document doc = new Document(MyDir + "Document.docx");

// We can set the zoom factor to a percentage
doc.ViewOptions.ViewType = ViewType.PageLayout;
doc.ViewOptions.ZoomPercent = 50;

// Or we can set the ZoomType to a different value to avoid using percentages 
Assert.AreEqual(ZoomType.None, doc.ViewOptions.ZoomType);

doc.Save(ArtifactsDir + "ViewOptions.SetZoom.doc");
See Also