Partager via


DocumentBase.HTMLDivisions Property

Definition

Gets an HTMLDivisions object that represents an HTML division in a Web document.

public:
 property Microsoft::Office::Interop::Word::HTMLDivisions ^ HTMLDivisions { Microsoft::Office::Interop::Word::HTMLDivisions ^ get(); };
public Microsoft.Office.Interop.Word.HTMLDivisions HTMLDivisions { get; }
member this.HTMLDivisions : Microsoft.Office.Interop.Word.HTMLDivisions
Public ReadOnly Property HTMLDivisions As HTMLDivisions

Property Value

An HTMLDivisions object that represents an HTML division in a Web document.

Examples

The following code example adds an HTMLDivisions to the document and then displays a message that shows the total number of HTMLDivisions in the document. To use this example, run it from the ThisDocument class in a document-level project.

private void DocumentHTMLDivisions()
{
    object divisionRange = this.Paragraphs[1].Range;
    this.HTMLDivisions.Add(ref divisionRange);
    MessageBox.Show ("Total HTML Divisions: " + 
        this.HTMLDivisions.Count.ToString());
}
Private Sub DocumentHTMLDivisions()
    Dim divisionRange As Object = Me.Paragraphs(1).Range
    Me.HTMLDivisions.Add(divisionRange)
    MessageBox.Show("Total HTML Divisions: " & Me.HTMLDivisions.Count.ToString())
End Sub

Applies to