| View previous topic :: View next topic |
| Author |
Message |
maxmars Newbie

Joined: 20 Mar 2008 Posts: 1
|
Posted: Thu Mar 20, 2008 8:57 am Post subject: Print footer on last page only |
|
|
Hello,
As the subject says, I want to show footer on last page only.
The trick here is that the document is created automatically (with a tool that uses the SDK APIs) so I can't manually set styles in the document as I would do if, say, I edited the document myself.
It would be ok even if it could be done with a script that made the text white-on-white / invisible on all pages but the last (i.e. by means of a trick).
Can anyone help me please? If this cannot be done we'll have to do without openoffice for this customer and I'd really hate that.
Thanks in advance. |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8976 Location: Lexinton, Kentucky, USA
|
Posted: Thu Mar 20, 2008 1:56 pm Post subject: |
|
|
| Quote: | | If this cannot be done we'll have to do without openoffice for this customer and I'd really hate that. |
Don't want to lose a user. | Code: | Sub FooterOnLastPage
oDoc = ThisComponent
oVC = oDoc.CurrentController.getViewCursor
oVC.jumpToLastPage
oVC.jumpToStartOfPage
oVC.BreakType = 0
oVC.PageDescName = "Index" 'Case sensitive.
oPages = oDoc.getStyleFamilies.getByName("PageStyles") 'Case sensitive.
oPage = oPages.getByName("Index") 'Case sensitive.
oPage.FooterIsOn = true
oPage.FooterText.String = "Page " & oVC.getPage
End Sub |
|
|
| Back to top |
|
 |
|