Syntax
OutlineLevel()
Remarks
Returns a number corresponding to the heading level of the selected paragraph. Returns 0 (zero) if the style of the selected paragraph is not a built-in heading level style. If multiple paragraphs are selected, OutlineLevel() returns the heading level of the first paragraph in the selection.
Example
This example deletes all paragraphs in a document that are not formatted with a built-in heading level style:
StartOfDocument ViewNormal While ParaDown() ParaUp 'Go to each paragraph in turn. If OutlineLevel() = 0 Then 'If it's not a heading, ParaDown 1, 1 'select it, then EditClear 'delete it. Else 'If it is a heading, ParaDown 'go to the next paragraph End If Wend 'and begin the process again.
See Also
FormatStyle, StyleName$()