Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

page breaks and control characters 1

Status
Not open for further replies.

wuxapian

Programmer
Jun 13, 2001
52
GB
Can anyone help me? I am trying to insert a page break into a word document (from a vba macro) and make the new page the current page.

Can anyone tell me how to do this?

Wuxapian...
 
InsertBreak Method

Inserts a page, column, or section break.

Syntax

expression.InsertBreak(Type)

expression Required. An expression that returns a Range or Selection object.

Type Optional Variant. The type of break to be inserted. Can be one of the following WdBreakType constants: wdPageBreak, wdColumnBreak, wdSectionBreakNextPage, wdSectionBreakContinuous, wdSectionBreakEvenPage, wdSectionBreakOddPage, or wdLineBreak. The default value is wdPageBreak.

Remarks

When you insert a page or column break, the range or selection is replaced by the break. If you don't want to replace the range or selection, use the Collapse method before using the InsertBreak method. When you insert a section break, the break is inserted immediately preceding the Range or Selection object.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top