ToolsOptionsView

Syntax

ToolsOptionsView [.DraftFont = number] [, .WrapToWindow = number] [, .PicturePlaceHolders = number] [, .FieldCodes = number] [, .BookMarks = number] [, .FieldShading = number] [, .StatusBar = number] [, .HScroll = number] [, .VScroll = number] [, .StyleAreaWidth = number or text] [, .Tabs = number] [, .Spaces = number] [, .Paras = number] [, .Hyphens = number] [, .Hidden = number] [, .ShowAll = number] [, .Drawings = number] [, .Anchors = number] [, .TextBoundaries = number] [, .VRuler = number] [, .Highlight = number]

Remarks

Displays or hides various elements in the active document or macro-editing window and the Word window. With the exception of .StatusBar, which controls the display of the status bar no matter which window is active, the arguments for ToolsOptionsView control the display of elements on a window-by-window basis. The arguments correspond to the options on the View tab in the Options dialog box (Tools menu). As indicated in the following table, not all arguments are available in every view or in the macro-editing window. Specifying an argument that is not available in the active view generates an error.

Argument

Explanation

Available in these views

.DraftFont

If 1, shows all text in the same font without formatting.

Normal, outline, macro

.WrapToWindow

If 1, Word wraps text within document windows; column formatting is ignored.

Normal, outline, macro

.PicturePlaceHolders

If 1, displays placeholders for graphics.

Normal, outline, page layout

.FieldCodes

If 1, displays field codes.

Normal, outline, page layout

.BookMarks

If 1, displays bold brackets around text marked with a bookmark.

Normal, outline, page layout

.FieldShading

Specifies when to display fields with shading:

0 (zero) Never

1 Always

2 When Selected

Normal, outline, page layout

.StatusBar

If 1, displays the status bar.

All

.HScroll

If 1, displays horizontal scroll bars in document windows.

All


Argument

Explanation

Available in these views

.VScroll

If 1, displays vertical scroll bars in document windows.

All

.StyleAreaWidth

Sets the width of the style area in twips (20 twips = 1 point; 72 points = 1 inch) or a text measurement.

Normal, outline

.Tabs

If 1, displays tab marks.

All

.Spaces

If 1, displays space marks.

All

.Paras

If 1, displays paragraph marks.

All

.Hyphens

If 1, displays optional hyphens.

All

.Hidden

If 1, displays hidden text.

All

.ShowAll

If 1, displays all nonprinting characters.

All

.Drawings

If 0 (zero), hides any drawing objects you've created in your documents.

Page layout

.Anchors

If 1, displays anchors next to items that may be positioned.

Page layout

.TextBoundaries

If 1, displays text boundaries.

Page layout

.VRuler

If 1, displays the vertical ruler.

Page layout

.Highlight

If 1, displays highlight formatting that has been applied to text.

This argument is available only in Word version 7.0.

Normal, outline, page layout


Example

This example toggles the display of hidden text:


Dim dlg As ToolsOptionsView
GetCurValues dlg
dlg.ShowAll = 0
If dlg.Hidden Then
    dlg.Hidden = 0
Else
    dlg.Hidden = 1
End If
ToolsOptionsView dlg

See Also

ShowAll, TableGridlines, ToggleFull, ToolsOptionsCompatibility, ViewDraft, ViewRibbon, ViewRuler, ViewStatusBar