[Solved] Change OO Options with UNO API
-
- Posts: 30
- Joined: Thu Dec 29, 2016 12:22 pm
[Solved] Change OO Options with UNO API
Hi everybody
Can i change the option on "Tools->Options->OpenOffice Writer->Print check Print automatically inserted blank pages" programatically with UNO API?
Can i change the option on "Tools->Options->OpenOffice Writer->Print check Print automatically inserted blank pages" programatically with UNO API?
Last edited by oliveiratr on Fri Aug 04, 2017 7:05 pm, edited 1 time in total.
OpenOffice 4.1.2
Re: Change OO Options with UNO API
Don't know the answer to this, but if it is possible, be aware that the Table of Contents will most probably not update.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
-
- Posts: 30
- Joined: Thu Dec 29, 2016 12:22 pm
Re: Change OO Options with UNO API
Can i eliminate the "invisible blank pages" programatically?
This resolve my problem too
Sorry for my english
This resolve my problem too
Sorry for my english
OpenOffice 4.1.2
-
- Posts: 30
- Joined: Thu Dec 29, 2016 12:22 pm
Re: Change OO Options with UNO API
i called this code:
After this, when my doc have 2, 4 ,6 ,8 , 10, 12, 14... pages always generate "invisible blank pages" before each page
But, i dont want generate this blank pages, how can i remove these pages, or other solutions
OBS.: I need put the fchange_initial_page_number to my macho works fine
Code: Select all
Function fchange_initial_page_number(alInitValue as Integer)
oText = ThisComponent.getText()
oCursor = oTexto.createTextCursor()
oCursor.BreakType = com.sun.star.style.BreakType.PAGE_BEFORE
oCursor.PageNumberOffset = alInitValue + 1
End Function
But, i dont want generate this blank pages, how can i remove these pages, or other solutions
OBS.: I need put the fchange_initial_page_number to my macho works fine
OpenOffice 4.1.2
Re: Change OO Options with UNO API
Chang your page style to Default, Mirrored, or alternate Right pages with Left pages.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
-
- Posts: 30
- Joined: Thu Dec 29, 2016 12:22 pm
Re: Change OO Options with UNO API
Sorry for my ignorance, but, how this resolve my problem and, how i can do this programatically?
OpenOffice 4.1.2
Re: Change OO Options with UNO API
This will resolve your problem because left pages will follow right pages and there will be no blank pages inserted.
How you do this programatically is up to you - you are writing the program; I don't need to do that and have other calls on my time. You should refer to the Andrew Pitonyak books on macro programming, at
http://www.pitonyak.org/oo.php
How you do this programatically is up to you - you are writing the program; I don't need to do that and have other calls on my time. You should refer to the Andrew Pitonyak books on macro programming, at
http://www.pitonyak.org/oo.php
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
-
- Posts: 30
- Joined: Thu Dec 29, 2016 12:22 pm
Re: Change OO Options with UNO API
I resolve with this code:
Thanks for your help, or no
Code: Select all
oDoc = ThisComponent
oSettings = oDoc.createInstance("com.sun.star.text.DocumentSettings")
oSettings.PrintEmptyPages = False
OpenOffice 4.1.2
Re: [Solved]Change OO Options with UNO API
Check that your page numbering is correct. You may find that pages are numbered 1, 3, 5...
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
-
- Posts: 30
- Joined: Thu Dec 29, 2016 12:22 pm
Re: [Solved]Change OO Options with UNO API
Yes, works fine, thanks for your time.RoryOF wrote:Check that your page numbering is correct. You may find that pages are numbered 1, 3, 5...
OpenOffice 4.1.2