Copy Header and footer

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
albert_tg77
Posts: 1
Joined: Thu Sep 30, 2010 5:33 pm

Copy Header and footer

Post by albert_tg77 »

Hello,

I need to copy the content of a document to another.
The content of the document is easy to copy with InsertDocumentFromURL, but i don't konw how to copy the header and the footer of the document.

Any help?
OpenOffice 3.2 VB
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Copy Header and footer

Post by Zizi64 »

The Header(s) and Footer(s) are stored in Pagestyles. Maybe the source document contains not only one Pagestyle. In this case you need to create user Pagestyles in destination documents, and copy the Headers/Footers contents. Maybe (I not tried) the your copy methode can copiing the Pagestyles together with text body then not needed to create new Pagestyles in destination document.

You can copy the content os Headers/Footers manually.

Or you can create a Basic subroutine to manipulate the Pagestyles (Footers/Headers).
some similar examples:
http://user.services.openoffice.org/en/ ... =9&t=34113
http://user.services.openoffice.org/en/ ... 29&t=32189
http://user.services.openoffice.org/en/ ... =9&t=33604
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Post Reply