View.ShowHeading Method
Word Developer Reference |
Shows all headings up to the specified heading level and hides subordinate headings and body text.
Syntax
expression.ShowHeading(Level)
expression Required. A variable that represents a View object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Level | Required | Long | The outline heading level (a number from 1 to 9). |
Remarks
This method generates an error if the view isn't outline view or master document view.
Example
This example switches the active window to outline view and displays all text that's formatted with the Heading 1 style. Body text and all other types of headings are hidden.
Visual Basic for Applications |
---|
|
This example switches the window for Document1 to outline view and displays all text that's formatted with the Heading 1, Heading 2, or Heading 3 style.
Visual Basic for Applications |
---|
|
See Also