Muokkaa

Jaa


Range.InsertBreak method (Word)

Inserts a page, column, or section break.

Syntax

expression. InsertBreak( _Type_ )

expression Required. A variable that represents a Range object.

Parameters

Name Required/Optional Data type Description
Type Optional Variant The type of break to be inserted.Can be one of the WdBreakType constants. If omitted, the default value is wdPageBreak.

Remarks

When you insert a page or column break, the range is replaced by the break. If you don't want to replace the range, use the Collapse method before using the InsertBreak method. When you insert a section break, the break is inserted immediately preceding the Range.

Some of the constants listed above may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

Example

This example inserts a page break immediately following the second paragraph in the active document.

Set myRange = ActiveDocument.Paragraphs(2).Range 
With myRange 
 .Collapse Direction:=wdCollapseEnd 
 .InsertBreak Type:=wdPageBreak 
End With

See also

Range Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.