Hi
I am trying to make a Macro to print card numbers on to CR80 cards.
The method that appears the best way to do this would be to use the page numbering tool in writer.
How would I script the macro to set the start page number x and add y number of blank pages
For example I wanted to start at page number 9000 and create 100 pages with no text in them other than the page number in the bottom left.
Thanks
Adding x blank Pages
Adding x blank Pages
Windows 7 Open Office 4.1.3
Re: Adding x blank Pages
This isn't quite right but it should get you started.
If the page style includes a footer with the page number, the new pages will have that.
Code: Select all
oVC = ThisComponent.CurrentController.ViewCursor
oVC.jumpToPage(6)
oVC.jumpToEndOfPage()
oText = ThisComponent.Text
Curs = oText.createTextCursorByRange(oVC.End)
for i = 1 to 10
Curs.gotoEndOfParagraph(FALSE)
oText.insertControlCharacter(Curs.End, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
Curs.BreakType = com.sun.star.style.BreakType.PAGE_BEFORE
next iOpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.