Board index » delphi » Insert a page break into word

Insert a page break into word

How do you insert a page break in a work 97 document VIA OleAutomation?
How can you determine the current page number of a Word 97 document?

--

 

Re:Insert a page break into word


I haven't done this in Delphi, but from VBA Help:

"Selection.InsertBreak Type := wdPageBreak"

(wdPageBreak has the value of 7) - other constants are:
wdSectionBreakContinuous = 3
wdSectionBreakEvenPage = 4
wdSectionBreakNextPage = 2
wdSectionBreakOddPage  = 5.

Also, "Selection.Paragraphs(x).PageBreakBefore = True" can be tried.

For the page number associated with a particular section, try:
"Selection.Information(wdActiveEndPageNumber)",
where wdActiveEndPageNumber = 3. This will give you the number of the page
on which the end-of-selection (selected block of text) is currently
situated.

You should be able to find Delphi OLE Automation objects and methods to
match the above.

HTH, RB

Rafel Coyle <rco...@pfshouston.com> schrieb in im Newsbeitrag:
3B141F0C.70A4B...@pfshouston.com...

Quote
> How do you insert a page break in a work 97 document VIA OleAutomation?
> How can you determine the current page number of a Word 97 document?

> --

Other Threads