[Solved] Macros IN Impress

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
BobDraper
Posts: 5
Joined: Tue Oct 09, 2012 9:12 am

[Solved] Macros IN Impress

Post by BobDraper »

Can anyone tell me if I can create a macro to run in Impress and if so how? What I want to do seems simple to me. I want to extend the interactions. I want a text label to become visible when an object is clicked. Is this possible or not?
Last edited by Hagar Delest on Wed Oct 10, 2012 8:27 am, edited 1 time in total.
Reason: tagged [Solved].
Apache Open Office 3.4.1 On Windows XP
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Macros IN Impress

Post by RoryOF »

You may possibly be able to do this using the inbuilt animation/transitions.
 Edit: 1: Using the inbuilt animations I was able to make a line of type appear on a click; I have not sufficient experience (or need) to be able to cause the type to appear on a localised click, but if that is possible I'm sure someone else will help. 
 Edit: 2: There is information at
http://www.oooforum.org/forum/viewtopic.phtml?t=78116
which may be helpful. 
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Macros IN Impress

Post by acknak »

You may be more likely to get suggestions by asking on one of the programming areas of the forum: http://forum.openoffice.org/en/forum/viewforum.php?f=20
AOO4/LO5 • Linux • Fedora 23
FJCC
Moderator
Posts: 9277
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Macros IN Impress

Post by FJCC »

Macros can be triggered easily from clicking on a shape. The difficulty (for me) with what you want to do is that the image shown during a presentation cannot be changed in the way I expected once the presentation is active. I can make the text on a shape disappear or appear with a click while looking at the slide in the edit mode but the presentation just shows a static image of what the slide looked like when the presentation started. The macro runs but the displayed image does not change. I will play with this more tonight, I hope. The attached file illustrates the problem.
Attachments
MacroOnClick.odp
(11.73 KiB) Downloaded 327 times
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
BobDraper
Posts: 5
Joined: Tue Oct 09, 2012 9:12 am

Re: Macros IN Impress

Post by BobDraper »

FjCC I downloaded your attachment and eventually dug out the macro:
When I run this presentation nothing happens. It starts off with 'Hi' and sticks at that despite repeated clicks.
The code is interesting.

I have worked out how to create a macro in Impress IE by using tools/macros/organize macros. The syntax is alien to me at the moment. I'm used to VB.

Another interesting problem occured in this. If I have a test label then right click and then 'control' here I can set the properties of it. If I set it to 'invisible', at runtime it is still visible.

Thanks to those who replied so far.
Apache Open Office 3.4.1 On Windows XP
Post Reply