DocumentViewOptions Property

Provides options to control how the document is displayed in Microsoft Word.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.9.0


public ViewOptions ViewOptions { get; }

Property Value

Type: ViewOptions


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.docx");

See Also