Calc Header image macro

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
matepero43
Posts: 3
Joined: Thu Apr 10, 2014 8:05 pm

Calc Header image macro

Post by matepero43 »

Hello everybody, I have probably a dumb question but I cannot find answer anywhere online.. I need macro which will simply put image into header, I have tried to do this using macro recorder while I go Format\Page\Header\More\background as image but that didn't worked... any suggestions? thx
Last edited by matepero43 on Sat Apr 12, 2014 12:55 pm, edited 1 time in total.
libreoffice 4.2 windows7
User avatar
Zizi64
Volunteer
Posts: 11362
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Calc Header from cell

Post by Zizi64 »

I don't know the exact answer.

(An idea:)
But you can adjust the Style of the page by macros. You need create some different page styles (with different images in header), and then apply one of them, by macro.

Here are some examples to manipulate the page style:
viewtopic.php?f=20&t=64546

http://www.oooforum.org/forum/viewtopic.phtml?t=47065
http://www.oooforum.org/forum/viewtopic.phtml?t=144080
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.
matepero43
Posts: 3
Joined: Thu Apr 10, 2014 8:05 pm

Re: Calc Header image macro

Post by matepero43 »

Zizi64 tnx for the reply, I have come upon the example you directed me to from this link http://sourceforge.net/projects/ooomacr ... 004-07-04/
but when i try to use any of the macros I get errors like Fehler in SUB: SetFooter, Zeilenr.: 235
Fehler-Nr. 423: Property or method not found: DocumentInfo.

Am i doing something wrong? forgive if this is a dumb question but I am a newbie :D
libreoffice 4.2 windows7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Calc Header image macro

Post by Villeroy »

Works for me with Apache OpenOffice 4.1
Your version 4.2 does not exist. Are you using LibreOffice?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
matepero43
Posts: 3
Joined: Thu Apr 10, 2014 8:05 pm

Re: Calc Header image macro

Post by matepero43 »

yeah I am :D, sorry this is such an embarrassment :D... I'm complete rookie :D, i will download now apache 4.1 and try
libreoffice 4.2 windows7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Calc Header image macro

Post by Villeroy »

Download the MRI extension instead and find out the newer service DocumentProperties that replaced DocumentInfo some years ago. Both services stand for what you see in menu:File>Properties.... AOO still supports both services.
Anyhow, you don't need any of these. Just take that macro as an example how someone else did something similar 10 years ago. The way how he accessed the header and footer remain the same.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply