Writer – Sharing Macro Template Document?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
REH-CAE-RPT
Posts: 14
Joined: Wed Jul 12, 2017 9:28 pm

Writer – Sharing Macro Template Document?

Post by REH-CAE-RPT »

What's the simplest way to have multiple users accessing a centrally located read-only document that contains macros they can apply individually?

I've attempted saving as an .odt and .ott document, but apparently this doesn't maintain any of the macros I'd saved within the original file. (I'd been saving any macros within what I believe is the default location, My Macros > Standard > Module1, which I now realize is potentially the issue...)

With Word, I can save as a .docm (Word Macro-Enabled Template) file and set to Read Only. Any modifications I make are then immediately usable by all. That's basically what I'm hoping to replicate.

Also, is the Alt + F11 "Edit Macros" function the easiest way to select and run macros, if any macros we use are going to be based in the same location? Can I create a menu icon for that function? (Alt + F8 is "Run Macros", but you have to expand the Library section each time you open it.)

Thanks!
LibreOffice 5.2.7.2 (x64) on Windows 7 Professional
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Writer – Sharing Macro Template Document?

Post by Zizi64 »

I've attempted saving as an .odt and .ott document, but apparently this doesn't maintain any of the macros I'd saved within the original file. (I'd been saving any macros within what I believe is the default location, My Macros > Standard > Module1, which I now realize is potentially the issue...)
You MUST store the macros into the document if you want share it with the document.
Shared macros.png

...And you (or the users) need to enable the macro running from a file:

Tools - Options - Open/LibreOffice - Security - Macro security - Medium.
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.
REH-CAE-RPT
Posts: 14
Joined: Wed Jul 12, 2017 9:28 pm

Re: Writer – Sharing Macro Template Document?

Post by REH-CAE-RPT »

Understood and applied. Thanks.

Does it matter if I save as a .odt or .ott file?

Any suggestions for a shortcut key or icon? Even with the Alt + F11 "Edit Macros" function, I'd have to expand the "Macro From" folders each time I open it, which guarantees they won't be used, in my experience...
LibreOffice 5.2.7.2 (x64) on Windows 7 Professional
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Writer – Sharing Macro Template Document?

Post by Zizi64 »

Does it matter if I save as a .odt or .ott file?
It is harder to rewrite the original .ott file accidentally, but it is so easy to rewrite an .odt file. The .ott files will lost the original URL at opening.
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.
Post Reply