Paragraph.OutlineLevel Property (Word)
Returns or sets the outline level for the specified paragraph. Read/write WdOutlineLevel.
This example returns the outline level of the first paragraph in the active document.
This example sets the outline level for each paragraph in the active document. First the Normal style is applied to all paragraphs. The Mod operator is used to determine which outline level (1, 2, or 3) to apply to successive paragraphs in the document, and then the view is changed to outline view.
Set myParas = ActiveDocument.Paragraphs ActiveDocument.Paragraphs.Style = wdStyleNormal For x = 1 To myParas.Count If x Mod 3 = 1 Then myParas(x).OutlineLevel = wdOutlineLevel1 ElseIf x Mod 3 = 2 Then myParas(x).OutlineLevel = wdOutlineLevel2 Else myParas(x).OutlineLevel = wdOutlineLevel3 End If Next x ActiveDocument.ActiveWindow.View.Type = wdOutlineView