Description
This class is used manipulate the View settings for a document.C#
C#
Remarks
You cannot create a new WordViewSettings object. You must use the Document.ViewSettings property to retrieve WordViewSettings properties for a document.
The following sample gets the WordViewSettings
object of a document.
Examples
WordApplication app = new WordApplication(); Document doc = app.Open(@"C:\sample.doc"); WordViewSettings viewSettings = doc.ViewSettings; |
Dim app As New WordApplication() Dim doc As Document = app.Open("C:\sample.doc") Dim viewSettings As WordViewSettings = doc.ViewSettings |
Properties
Name | Description |
---|---|
Sets or returns an int object that represents the number of heading levels that will be displayed by Word in the outline view for this document. This can be set to a number between 1 and 9. | |
Sets or returns a boolean that represents whether Word will display field results (true) or just the field text itself (false) in a document. For example, when set to true you will see the full contents of a mergefield instead of just the text value inside it. | |
Sets or returns a boolean that represents whether or not Word will display hidden contents in a document. When set to true, Word displays text formatted as hidden with a dotted underline. When you print hidden text, the dotted underline does not appear. | |
Sets or returns a WordViewSettings.ViewType object that represents the type of view this document will be displayed in when opened by Word. Possible values: Normal, Outline, Page. | |
Sets or returns a boolean that represents whether or not Word will display an envelope overlay with this document (if there is one). | |
Sets or returns a boolean that represents whether or not Word will display the footer inside the page border for a document. | |
Sets or returns a boolean that represents whether or not Word will display the header inside the page border for a document. | |
Sets or returns a boolean that represents whether or not Word will shade form fields in a document. | |
Sets or returns a WordViewSettings.ZoomType object that represents the zoom type the document will be displayed with when opened by Word. Possible values: None, FullPage, PageWidth). | |
Sets or returns an int that represents the zoom percentage this document will be displayed with when opened by Word. Possible values: Normal, Outline, Page. |