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

OO 2.0: where are menu files and macro library files saved?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
OOMacroProgrammer
General User
General User


Joined: 07 Jul 2005
Posts: 10

PostPosted: Thu Jul 07, 2005 3:51 am    Post subject: OO 2.0: where are menu files and macro library files saved? Reply with quote

Hello,

I am new to OpenOffice macros programming. I am using OO version 1.9.87.
I have written a simple macro that displays a messagebox to the user. I want to launch this macro on the click of a menu item.

I have managed to create the menu and assign the macro to the menu.
Now I want to run the same macro on another machine which has OO 1.9.87 installed.
My concerns are:
1. What all files do I need to copy from my machine?
a. File/s for the menu?
b. File/s for the macro library?
2. What steps will I need to carry out on the other machine to be able to run my macro there, viz.. Appending the library and menu?

P.S. I believe there is an menubar.xml file created in <user\config\soffice.cfg\modules\swriter\menubar> in the Open Office.org folder in Documents and Settings folder. Do I have to copy this file to the other machine? Any other dependencies of this file?
But, I couldnot locate the location where my macro library is stored.

It will be of great help if I can get some help on the same. Perhaps a step by step guide on how to create a simple macro with a menu and the files associated to distribute it will be of great help to me so that I can cross-check if I am on the correct track.

Thanks and regards,
OOProgrammer.
Back to top
View user's profile Send private message
pitonyak
Administrator
Administrator


Joined: 09 Mar 2004
Posts: 3655
Location: Columbus, Ohio, USA

PostPosted: Thu Jul 07, 2005 10:25 am    Post subject: Reply with quote

You are using the 2.0 development release, so you can probably do this directly with the API. This is probably prefered to modifying the XML configuration files directly.

I do not have access to this information, but I think that I have old emails from the dev list with at least one example. I did a quick search of the dev list, but I did not find the examples. I was just looking at them last night and emailed them to someone else... Hmmm..
_________________
--
Andrew Pitonyak
http://www.pitonyak.org/oo.php
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
OOMacroProgrammer
General User
General User


Joined: 07 Jul 2005
Posts: 10

PostPosted: Sun Jul 10, 2005 11:26 pm    Post subject: Re:OO2.0: where are menu files and macro library files saved Reply with quote

Hello,

Thanks for the help. I actually found an alternate to distribute my macro. This is what I did, please guide me incase I'm doing something wrong!

Step 1: Record a macro and store it in a new library under My Macros. This library gets saved in <C:\Documents and Settings\<username>\Application Data\
OpenOffice.org1.9.87 \user\basic>
. A new folder gets automatically created here by the name of the library. Note: The files of this folder are visible only if u exit from OpenOffice and from the QuickStarter in the systray too.

Step 2: Create a new menu using Tools->Customise and save it underOpenOffice.org Writer. The new menu item gets reflected in the xml file stored in the following location: <C:\Documents and Settings\<username>\Application Data\ OpenOffice.org1.9.87\user\config\soffice.cfg\modules\swriter\menubar>

Step 3: Assign the macro recorded in Step 1 to the menu created in Step 2 using Tools->Customise>Menus->Add Commands.

Now, on clicking that particular menu item, the macro is launched.

To run the macro on another machine this is what I did:

Step 1: Replace the menu xml file at the location <C:\Documents and Settings\<username>\Application Data\ OpenOffice.org1.9.87\user\config\soffice.cfg\modules\swriter\menubar>[/b]

Step 2: Copy the macro library to the folder: C:\Program Files\OpenOffice.org 1.9.87\share\basic.

Step 3: Append this library in OO writer using Tools->Macros->Organise Macros->OpenOffice.org basic. Here click Organiser and append the library.

Now when u click on the menu item, the macro is launched.

Is there any catch I'm missing out on in this procedure?

Thanks,
OOProgrammer.
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 Macros and API 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