ruspaster.blogg.se

How to insert page break in word 2010
How to insert page break in word 2010




how to insert page break in word 2010
  1. #How to insert page break in word 2010 how to
  2. #How to insert page break in word 2010 code

This works quite reliably: ActiveDocument.Styles("MyTableStyle").Table.AllowBreakAcrossPage = True How to use this property False, the return value is 0 (which is kind of what you'd expect) and Word acknowledges that the value is. True, the return value is 1 (which is not what you'd expect), and Word denies that the value is. ?ActiveDocument.Styles("MyTableStyle").Table.AllowBreakAcrossPage = False ' returns False

#How to insert page break in word 2010 code

Here is some sample VBA code from the immediate window: ?ActiveDocument.Styles("MyTableStyle").Table.AllowBreakAcrossPage = True ' returns False Reading the propertyįor a newly-created style, the default value is 1. But a newly-created style returns a value of 1 (not -1) for this property. The documentation says that this property returns a Long (not a Boolean), and that the default value is True. If I create a new table style, I observe that rows break across the page. And I can use the user interface to allow an individual row to break across a page if I need to.Īs far as I can see, you can't use this property to define a table style such that some rows will break and others won't. But we can achieve the same thing using.

how to insert page break in word 2010

Setting this property on the table style tells Word to do just what I want. In most tables I create, I don't want any rows to break across a page. However, in the user interface, you can override the setting for one individual row in a table to which this table style has been applied. So it applies to all rows in the table.Īs far as I can see, there is no way to set this property from the user interface. But this is a property of the table style, not individual rows. It determines whether the individual rows in a table may break across a page. It controls the behaviour of individual rows, not the whole table. AllowBreakAcrossPage property applies to the Table of a table style. In a table style: prevent or allow page breaks within rows (.AllowBreakAcrossPage ) What it does This page describes my observations about how these four settings work. The Microsoft Word object model has four settings that control page breaks in tables and table styles:

how to insert page break in word 2010

KeepWithNext sometimes keeps this paragraph on the same page as the next paragraph. AllowBreakAcrossPages controls page breaks within one or more rows. AllowBreakAcrossPage controls page breaks within all rows. Controlling page breaks in tables and table styles






How to insert page break in word 2010