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

Macros and LInux don't mix

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
roger.dettmer
General User
General User


Joined: 27 Jul 2007
Posts: 9
Location: UK

PostPosted: Sat Jul 28, 2007 11:52 pm    Post subject: Macros and LInux don't mix Reply with quote

Hi

I'm running Ubuntu 6.06, and I simply can't get the macro faciity in Writer to work.

I can record a macro, but when I attempt to run it, using Tools>Macros>Run Macros, Writer simply freezes, i.e. I get no reponse to mouse clicks. Eventually, I get a message that Writer is not responding, and have to opt for the 'force quit' button.

On re-starting Writer I get a message that recovery in not yet complete, I opt to complete recovery, and get a message that recovery is finish and I'm told an error report has been completed, and that I should click the 'next' button to submit the report. However, there's no next button, just a finish button.

There's something very wrong here, does anyone have any ideas about how to get to the bottom of it.

Roger D
Back to top
View user's profile Send private message
9point9
Moderator
Moderator


Joined: 31 Aug 2004
Posts: 3875
Location: UK

PostPosted: Sun Jul 29, 2007 12:24 am    Post subject: Reply with quote

Maybe it's the macro you have tried to record which doesn't work?

Try writing one from scratch:
Code:
Sub Main
Msgbox("Test")
End Sub

_________________
Arch Linux
OOo 3.2.0

OOoSVN, change control for OOo documents:
http://sourceforge.net/projects/ooosvn/
Back to top
View user's profile Send private message Visit poster's website
B Marcelly
Super User
Super User


Joined: 12 May 2004
Posts: 1453
Location: France

PostPosted: Sun Jul 29, 2007 12:37 am    Post subject: Re: Macros and LInux don't mix Reply with quote

roger.dettmer wrote:
I can record a macro, but when I attempt to run it, using Tools>Macros>Run Macros, Writer simply freezes, i.e. I get no reponse to mouse clicks. Eventually, I get a message that Writer is not responding, and have to opt for the 'force quit' button.

Did you wait enough time ? Twisted Evil

It may seem strange but, due to implementation decisions, Tools>Macros>Run Macros needs the Java runtime to work. If it is not already in memory it takes a lot of time on slow machines.

Try Tool > Macros > Organize macros > OpenOffice.org Basic
This path does not need Java.
______
Bernard
Back to top
View user's profile Send private message Visit poster's website
roger.dettmer
General User
General User


Joined: 27 Jul 2007
Posts: 9
Location: UK

PostPosted: Sun Jul 29, 2007 3:22 am    Post subject: Re: Macros and LInux don't mix Reply with quote

B Marcelly wrote:
roger.dettmer wrote:
I can record a macro, but when I attempt to run it, using Tools>Macros>Run Macros, Writer simply freezes, i.e. I get no reponse to mouse clicks. Eventually, I get a message that Writer is not responding, and have to opt for the 'force quit' button.

Did you wait enough time ? Twisted Evil

It may seem strange but, due to implementation decisions, Tools>Macros>Run Macros needs the Java runtime to work. If it is not already in memory it takes a lot of time on slow machines.

Try Tool > Macros > Organize macros > OpenOffice.org Basic
This path does not need Java.

I tried Macros>Organize macros>Openoffice.orgBasic, and now it looks as though I haven't recorded my macro after all. I'm carefully following the instructions in Ch 17 of the Getting Started Guide - I open the container named My Macros, I find the library named My Macros, I create a new module, named recorded, and I enter a name for the macro in the upper left hand corner, then I click Save. But, when I go to look for the maro, using Tools>Macros>Organise macros>OpenOffice.orgBasic, It isn't there.

Any ideas?

Roger D
______
Bernard
Back to top
View user's profile Send private message
Mark B
Super User
Super User


Joined: 16 Feb 2007
Posts: 852
Location: Lincolnshire, UK

PostPosted: Sun Jul 29, 2007 3:34 am    Post subject: Reply with quote

It's probably worth pointing out that if you're using the Ubuntu version of OOo then it's based on 2.0.4. It may be worth you installing the most current version of OOo and see if that solves the problem.

Mark
_________________
Mark B's Articles
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
roger.dettmer
General User
General User


Joined: 27 Jul 2007
Posts: 9
Location: UK

PostPosted: Sun Jul 29, 2007 4:52 am    Post subject: Reply with quote

Mark B wrote:
It's probably worth pointing out that if you're using the Ubuntu version of OOo then it's based on 2.0.4. It may be worth you installing the most current version of OOo and see if that solves the problem.

Mark


Sorry, but I don't fancy that, and it seems a bit unlikely that everybody using Ubuntu 6.06 can't do OpenOffice macros. However, I am making a bit of progress. I checked with the help function, and found that I need to click Esc before the the Stop Recording button, and I've now managed to record a macro that's supposed to generate my job title: technical editor. However when I do >> OpenOffic.orgBasic, run, I get the message:

BASIC syntax error, symbol expected.

I've checked the Macro code using edit, and here's what I get:

sub title
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:InsertPara", "", 0, Array())

rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:InsertPara", "", 0, Array())

rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "Text"
args3(0).Value = "Technical Editor"

dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args3())

rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:Escape", "", 0, Array())


end sub

Does this give anyone any clues as to what's wrong?

Regards

Roger D
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


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

PostPosted: Sun Jul 29, 2007 6:55 am    Post subject: Reply with quote

FWIW, your macro runs without error under Windows, OOo 2.2, using Run Macro.
Back to top
View user's profile Send private message
Mark B
Super User
Super User


Joined: 16 Feb 2007
Posts: 852
Location: Lincolnshire, UK

PostPosted: Sun Jul 29, 2007 8:38 am    Post subject: Reply with quote

JohnV wrote:
FWIW, your macro runs without error under Windows, OOo 2.2, using Run Macro.

Ditto on SUSE 10.1 with OOo 2.2 (and 2.0.4)
_________________
Mark B's Articles
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
roger.dettmer
General User
General User


Joined: 27 Jul 2007
Posts: 9
Location: UK

PostPosted: Sun Jul 29, 2007 8:48 am    Post subject: Reply with quote

Mark B wrote:
JohnV wrote:
FWIW, your macro runs without error under Windows, OOo 2.2, using Run Macro.

Ditto on SUSE 10.1 with OOo 2.2 (and 2.0.4)


That's very interesting, maybe there's something rather basic wrong with my system. Any ideas for what I should try next?t.

Any suggestions?

Roger D
Back to top
View user's profile Send private message
Hagar Delest
Super User
Super User


Joined: 06 Feb 2006
Posts: 5164
Location: France

PostPosted: Sun Jul 29, 2007 11:15 am    Post subject: Reply with quote

Works fine for me also under Ubuntu 6.06 and OOo 2.2.1.

You should remove the Ubuntu version of OOo and install the official one, see here : [Ubuntu] Installing OOo on Debian and Co.
_________________
Now on the EN user community forum
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