ViewType
ViewOptions.ViewType property
Styr visningsläget i Microsoft Word.
public ViewType ViewType { get; set; }
Anmärkningar
Även om Aspose.Words kan läsa och skriva till det här alternativet, är dess användning applikationsspecifik. Till exempel respekterar inte MS Word 2013 värdet av det här alternativet.
Exempel
Visar hur man ställer in en anpassad zoomfaktor, som äldre versioner av Microsoft Word kommer att tillämpa på ett dokument vid laddning.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Hello world!");
doc.ViewOptions.ViewType = ViewType.PageLayout;
doc.ViewOptions.ZoomPercent = 50;
Assert.AreEqual(ZoomType.Custom, doc.ViewOptions.ZoomType);
Assert.AreEqual(ZoomType.None, doc.ViewOptions.ZoomType);
doc.Save(ArtifactsDir + "ViewOptions.SetZoomPercentage.doc");
Se även
- enum ViewType
- class ViewOptions
- namnutrymme Aspose.Words.Settings
- hopsättning Aspose.Words