Calc Header image macro

Creating a macro - Writing a Script - Using the API

Calc Header image macro

Postby matepero43 » Thu Apr 10, 2014 8:24 pm

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
matepero43
 
Posts: 3
Joined: Thu Apr 10, 2014 8:05 pm

Re: Calc Header from cell

Postby Zizi64 » Fri Apr 11, 2014 7:27 am

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:
https://forum.openoffice.org/en/forum/v ... 20&t=64546

http://www.oooforum.org/forum/viewtopic.phtml?t=47065
http://www.oooforum.org/forum/viewtopic.phtml?t=144080
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.0; AOO4.1.6
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.
User avatar
Zizi64
Volunteer
 
Posts: 8766
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Calc Header image macro

Postby matepero43 » Sat Apr 12, 2014 1:18 pm

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
matepero43
 
Posts: 3
Joined: Thu Apr 10, 2014 8:05 pm

Re: Calc Header image macro

Postby Villeroy » Sat Apr 12, 2014 1:35 pm

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, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27724
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Calc Header image macro

Postby matepero43 » Sat Apr 12, 2014 3:30 pm

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
matepero43
 
Posts: 3
Joined: Thu Apr 10, 2014 8:05 pm

Re: Calc Header image macro

Postby Villeroy » Sat Apr 12, 2014 3:41 pm

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, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27724
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 3 guests