DocumentBase.HTMLDivisions Property
Gets an HTMLDivisions object that represents an HTML division in a Web document.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Syntax
'Declaration
Public ReadOnly Property HTMLDivisions As HTMLDivisions
public HTMLDivisions HTMLDivisions { get; }
Property Value
Type: Microsoft.Office.Interop.Word.HTMLDivisions
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 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
private void DocumentHTMLDivisions()
{
object divisionRange = this.Paragraphs[1].Range;
this.HTMLDivisions.Add(ref divisionRange);
MessageBox.Show ("Total HTML Divisions: " +
this.HTMLDivisions.Count.ToString());
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.