| View previous topic :: View next topic |
| Author |
Message |
mythril General User

Joined: 14 Dec 2005 Posts: 13
|
Posted: Thu Jan 05, 2006 8:27 am Post subject: How do I attach a macro to an OO.o Base file.... |
|
|
| How do I attach a macro to an OO.o Base file in such a way that I will be able to launch the .odb from another computer on the network and all of my macros will still work? |
|
| Back to top |
|
 |
noranthon Super User

Joined: 07 Jul 2005 Posts: 3318
|
Posted: Thu Jan 05, 2006 11:41 pm Post subject: |
|
|
This is probably sacrilege but it seems to me that the only way you can do this (short of editing the soffice macros) is to add a module to one of the soffice libraries. At least one library ("Gimmicks") on my computer lets you do that. The soffice libraries are prefixed "[Open Office.org Macros and Dialogs]".
From a Base document, that means /Tools /Macros /Organize Macros /OpenOffice.org Basic , then select a macro in one of the libraries and press Edit. (Don't edit it.) Right-click on the tab for the last module in the window that opens (tabs at the bottom) and if the context menu gives you the command "Insert : Basic Module", you're in business. You can copy and paste your macro into the new module.
Actually running the macro would be a tedious process unless you can add a menu item to the menu on all computers on the network (hope that does not mean adding it one by one to the menu on each computer).
This outrageous suggestion may bring down the wrath of the righteous, so that will, hopefully bring some better ideas with it. |
|
| Back to top |
|
 |
mythril General User

Joined: 14 Dec 2005 Posts: 13
|
Posted: Tue Jan 10, 2006 8:32 am Post subject: Thank you |
|
|
This will work for the time being, but is incredibly tedious. If there is a better solution out there please speak up  _________________ Windows XP (Most flavors)
Linux (Gentoo)
OpenOffice.org (2.0) |
|
| Back to top |
|
 |
DrewJensen Super User


Joined: 06 Jul 2005 Posts: 2616 Location: Cumberland, MD
|
Posted: Tue Jan 10, 2006 8:41 am Post subject: |
|
|
Mythril,
You can attach macros to embedded forms in a database, or you can place macros into an outside library. Your choice. There is an issue with using the embedded forms, so I would pick the library path...
Then there is one other way...You can attach macros to ANY document other then an ODB file. Well, so why not just create a companion writer document for your database. All the macro's can be embedded in this document. If it is in the same path as the Base odb file then I believe you can just refer to the macros from your forms via relative addressing..
So - when you move you odb you have to take a odt along with it...
Oh, and about those menus..just attach them to the odt document...and they can reference the database...it becomes the NAVIGATOR form for your database.
Drew _________________ Blog - http://baseanswers.spaces.live.com/ |
|
| Back to top |
|
 |
|