Class Breaks (Word VBA)

A collection of page, column, or section breaks in a page. Use the Breaks collection and the related objects and properties to programmatically define page layout in a document. To use a Breaks class variable it first needs to be instantiated, for example


Dim brks as Breaks
Set brks = ActiveWindow.ActivePane.Pages(1).Breaks

For Each

Here is an example of processing the Breaks items in a collection.


Dim brk As Break
For Each brk In ActiveWindow.ActivePane.Pages(1).Breaks
	
Next brk

Count

Returns the number of items in the Breaks collection.


Dim lngCount As Long
lngCount = ActiveWindow.ActivePane.Pages(1).Breaks.Count

Item

Returns an individual Break object in a collection.

Item (Index)

Index: The individual object to be returned. Can be a Long indicating the ordinal position of the individual object.


Dim brk As Break
Set brk = ActiveWindow.ActivePane.Pages(1).Breaks(Index:=1)