Save macro only, not document too

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
BubikolRamios
Posts: 91
Joined: Sat Jan 04, 2014 1:28 pm

Save macro only, not document too

Post by BubikolRamios »

It appears when one saves macro, saves entire document. How to save macro only ?

 Edit: Changed subject, was Macro save 
Make your post understandable by others 
-- MrProgrammer, forum moderator 
Last edited by MrProgrammer on Wed Jun 22, 2022 11:46 pm, edited 1 time in total.
Reason: Updated subject
OPen office 4.1.5/ win 7
JeJe
Volunteer
Posts: 2763
Joined: Wed Mar 09, 2016 2:40 pm

Re: Save macro only, not document too

Post by JeJe »

There's a button on one of the IDE toolbars to save the module. Or you can copy and paste the macro to a text file.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
Zizi64
Volunteer
Posts: 11352
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Save macro only, not document too

Post by Zizi64 »

It appears when one saves macro, saves entire document. How to save macro only ?
When the macros are located inside the document, then it MUST to save the whole document if you want to save the macros inside.

Try to store the macros in the MyMacros in the User profile of the Office suite. (They will work with all of the documents, but they will not be portable.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
JeJe
Volunteer
Posts: 2763
Joined: Wed Mar 09, 2016 2:40 pm

Re: Save macro only, not document too

Post by JeJe »

You can also export and import a library the macro is in. Or convert a library to an extension.

https://wiki.openoffice.org/wiki/Docume ... /Libraries
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Post Reply