OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Print footer on last page only

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
maxmars
Newbie
Newbie


Joined: 20 Mar 2008
Posts: 1

PostPosted: Thu Mar 20, 2008 8:57 am    Post subject: Print footer on last page only Reply with quote

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
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Thu Mar 20, 2008 1:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group