Skip to content

Latest commit

 

History

History
81 lines (63 loc) · 1.82 KB

Word.HTMLDivision.HTMLDivisions.md

File metadata and controls

81 lines (63 loc) · 1.82 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
HTMLDivision.HTMLDivisions property (Word)
vbawd10.chm166133767
vbawd10.chm166133767
Word.HTMLDivision.HTMLDivisions
1a318e10-d447-1700-cc52-ed4cda508f3c
06/08/2017
medium

HTMLDivision.HTMLDivisions property (Word)

Returns an HTMLDivisions object that represents an HTML division in a web document.

Syntax

expression. HTMLDivisions

expression Required. A variable that represents an 'HTMLDivision' object.

Example

This example formats three nested divisions in the active document. This example assumes that the active document is an HTML document with at least three divisions.

Sub FormatHTMLDivisions() 
 With ActiveDocument.HTMLDivisions(1) 
 With .Borders(wdBorderLeft) 
 .Color = wdColorRed 
 .LineStyle = wdLineStyleSingle 
 End With 
 With .Borders(wdBorderRight) 
 .Color = wdColorRed 
 .LineStyle = wdLineStyleSingle 
 End With 
 With .HTMLDivisions(1) 
 .LeftIndent = InchesToPoints(1) 
 .RightIndent = InchesToPoints(1) 
 With .Borders(wdBorderTop) 
 .Color = wdColorBlue 
 .LineStyle = wdLineStyleDouble 
 End With 
 With .Borders(wdBorderBottom) 
 .Color = wdColorBlue 
 .LineStyle = wdLineStyleDouble 
 End With 
 With .HTMLDivisions(1) 
 .LeftIndent = InchesToPoints(1) 
 .RightIndent = InchesToPoints(1) 
 With .Borders(wdBorderLeft) 
 .LineStyle = wdLineStyleDot 
 End With 
 With .Borders(wdBorderRight) 
 .LineStyle = wdLineStyleDot 
 End With 
 With .Borders(wdBorderTop) 
 .LineStyle = wdLineStyleDot 
 End With 
 With .Borders(wdBorderBottom) 
 .LineStyle = wdLineStyleDot 
 End With 
 End With 
 End With 
 End With 
 
End Sub

See also

HTMLDivision Object

[!includeSupport and feedback]