Page 1 of 1

[Solved] Sharing macros with users on different systems

PostPosted: Fri Apr 18, 2008 9:04 pm
by ginestre
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

Re: sharing macros with other users on different systems

PostPosted: Fri Apr 18, 2008 9:40 pm
by Hagar Delest
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.

Re: sharing macros with other users on different systems

PostPosted: Sat Apr 19, 2008 12:09 am
by ginestre
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?

Re: sharing macros with other users on different systems

PostPosted: Sat Apr 19, 2008 12:31 am
by Villeroy
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.

Re: sharing macros with other users on different systems

PostPosted: Sat Apr 19, 2008 12:34 am
by bhmt
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 

Re: sharing macros with other users on different systems

PostPosted: Sat Apr 19, 2008 1:02 pm
by Hagar Delest
I've run the extension without reading any help file, it's really easy, just launch it and follow the steps.

Re: sharing macros with other users on different systems

PostPosted: Sun Apr 20, 2008 4:10 am
by kingfisher
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.

Re: sharing macros with other users on different systems

PostPosted: Sun Apr 20, 2008 5:44 pm
by Villeroy
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".

Re: sharing macros with other users on different systems

PostPosted: Sun Apr 20, 2008 9:30 pm
by Hagar Delest
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.