Hi.
Is there a way to apply a page style to all pages?
I have a post-mailmerge document that (for page numbering purposes) needs to have a single page style applied to all pages. When a MM happens each page is given it's own -- I just want them all back to Default.
I was hoping they're be a way to do it through the gui that I could catch with the macro recorder and just understand by analyzing its output but I can't seem to figure it out. Even if there's not a way to do so document-wide, is there an iterable collection of pages that I can then apply the style to?
Many thanks,
-C
[Solved] Apply page style to all pages...
-
- Posts: 19
- Joined: Mon Aug 17, 2009 5:45 pm
[Solved] Apply page style to all pages...
Last edited by cheuschober on Tue Aug 18, 2009 5:24 pm, edited 1 time in total.
OpenOffice.org 3.1.0
Fedora 11
Fedora 11
Re: Apply page style to all pages...
I think this is what you want. If not attach a copy of a short post merge document.
Code: Select all
Sub ChangePageStyle
oVC = ThisComponent.CurrentController.getViewCursor
oVC.JumpToFirstPage
Do
oVC.PageDescName = "Standard" 'Internal name for Default.
Loop While oVC.JumpToNextPage
End Sub
-
- Posts: 19
- Joined: Mon Aug 17, 2009 5:45 pm
Re: Apply page style to all pages...
JohnV,
You are a champ. I never thought it'd be so easy or simple.
Many thanks!
-C
You are a champ. I never thought it'd be so easy or simple.
Many thanks!
-C
OpenOffice.org 3.1.0
Fedora 11
Fedora 11
-
- Posts: 1
- Joined: Wed Apr 21, 2010 8:04 pm
Re: [Solved] Apply page style to all pages...
John V: you saved my life. Your contribution should be implemmented in the main system of the writer as an option like "aply styles to all pages".
BROFFICE 3.1 on Windows