Hi Nicole,

On 04/02/08 15:04, Nicole Scholz wrote:

But I think a pagebreak would be a possibility too. Perhaps you can give me an 
example how to set a pagebreak?

this basic code sets the page-break-before attribute at the last paragraph of the document. This will force the last paragraph to start on a new page:

Sub SetPageBreak
    xText = thiscomponent.getText
    xCur = xText.createTextCursor
    xCur.gotoEnd(false)
    xCur.setPropertyValue("BreakType",
                          com.sun.star.style.BreakType.PAGE_BEFORE)
End Sub

Hope this helps,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to