[Solved] Sharing macros with users on different systems

Creating a macro - Writing a Script - Using the API

[Solved] Sharing macros with users on different systems

Postby ginestre » Fri Apr 18, 2008 9:04 pm

In order to solve a specific problem at work, I've developed some macros, and customised the toolbar to launch them. They basically involve allowing the user to choose an external files to load into the current document. The external files are all just open office writer files with some text, all stored in the same GetTemplates directory.

Now I've fallen over at what I thought would be the easy bit: I can't find a way to give my colleagues the fruits of my work, so that they can use them.

I have developed them on my machine (Ubuntu linux running OOo 2.3), with my GetTemplates directory under /Home. Some of my colleagues use the same set up, but most use WinXP.

Can someone point me at a simple set of instructions for packaging, distributing and instaling these macros and the customised toolbar for Windows and Linux colleagues? I thought it would be easy, but I've spent hours and hours over the last three days failing to find a solution. Most of the pages I've found bear no relation at all to what I find on screen.

TIA
Last edited by Hagar Delest on Tue Aug 05, 2008 2:25 pm, edited 1 time in total.
Reason: tagged the thread as Solved.
ginestre
 
Posts: 18
Joined: Fri Apr 18, 2008 8:52 pm

Re: sharing macros with other users on different systems

Postby Hagar Delest » Fri Apr 18, 2008 9:40 pm

I just tried that extension and it works beautifully: BasicAddonBuilder - The Extension's packager.

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
AOO 4.1.5 on Xubuntu 18.04 and on Windows 7 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28204
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: sharing macros with other users on different systems

Postby ginestre » Sat Apr 19, 2008 12:09 am

Thanks for that reply. I have downloaded the BasicAddonBuilder, which looks interesting, and even updated to OOo 2.4- as well as installing the extension. But there are no instructions, and I still don't know in practical terms what to do! I have my macros and my menus in OOo 2.4, and the extension has been installed- but what do I do now? How do I make it work?
ginestre
 
Posts: 18
Joined: Fri Apr 18, 2008 8:52 pm

Re: sharing macros with other users on different systems

Postby Villeroy » Sat Apr 19, 2008 12:31 am

Define generic add-on menus and toolbars rather than your own ones. The menus can be main menus (behind "Help") or below "Tools>Add-Ons". Unfortunately the toolbars get generic titles "Add-On 1", "Add-On 2",...
This is defined in Addon.xcu quite easily. If I remember correctly the BasicAddonBuilder can do this for you. If all of your macros apply to certain templates, it should be possible to store all code, menues and toolbars in the respective templates and distribute the templates as extension.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25703
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: sharing macros with other users on different systems

Postby bhmt » Sat Apr 19, 2008 12:34 am

ginestre wrote:But there are no instructions, and I still don't know in practical terms what to do!

How do I make it work?


 Edit: Anyway, in this case I do see some instructions, but lower on the on the download page. Look for

Create an OpenOffice.org extension the easy way with BasicAddonBuilder (Linux.com) and

OpenOffice.org wiki 
bhmt
 
Posts: 78
Joined: Wed Nov 28, 2007 7:35 pm

Re: sharing macros with other users on different systems

Postby Hagar Delest » Sat Apr 19, 2008 1:02 pm

I've run the extension without reading any help file, it's really easy, just launch it and follow the steps.
AOO 4.1.5 on Xubuntu 18.04 and on Windows 7 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28204
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: sharing macros with other users on different systems

Postby kingfisher » Sun Apr 20, 2008 4:10 am

If all else fails, you can use the macro editor (last icon on the macro tool-bar) to export each module to a bas file, copy the files to the other systems and import each file to a module using the penultimate icon on the same tool-bar.
Apache OpenOffice 4.1.2 (64 bit) on PCLinuxOS
User avatar
kingfisher
Volunteer
 
Posts: 2111
Joined: Tue Nov 20, 2007 10:53 am

Re: sharing macros with other users on different systems

Postby Villeroy » Sun Apr 20, 2008 5:44 pm

Any ODF document can be seen as a package. As I mentioned above you can distribute macros and toolbars together with the file templates they are related to. If macros are not specific to templates, you can put them into their own libraries (not "Standard") within some nice manual document. Menu:Tools>Macros>Organize>Basic...[Organize...], tab:"Libraries", button [Import...] lets you import any document's libraries into global container "My Macros".
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 25703
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: sharing macros with other users on different systems

Postby Hagar Delest » Sun Apr 20, 2008 9:30 pm

The problem with the import of libraries is that if there is a dialog (a GUI) for the macro, it won't work because the links for the dialog buttons will still point to the modules in the document instead of the application. That's why making an extension is safer IMHO.
AOO 4.1.5 on Xubuntu 18.04 and on Windows 7 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28204
Joined: Sun Oct 07, 2007 9:07 pm
Location: France


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 5 guests