Writer – Sharing Macro Template Document?

Creating a macro - Writing a Script - Using the API

Writer – Sharing Macro Template Document?

Postby REH-CAE-RPT » Tue Aug 29, 2017 2:03 am

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
REH-CAE-RPT
 
Posts: 14
Joined: Wed Jul 12, 2017 9:28 pm

Re: Writer – Sharing Macro Template Document?

Postby Zizi64 » Tue Aug 29, 2017 7:06 am

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; LO4.4.7, LO6.1.6 on Win7-10 x64Prof.
PortableApps, winPenPack: LO3.3.0-6.2.4; AOO4.1.5
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.
User avatar
Zizi64
Volunteer
 
Posts: 8055
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Writer – Sharing Macro Template Document?

Postby REH-CAE-RPT » Tue Aug 29, 2017 10:01 am

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
REH-CAE-RPT
 
Posts: 14
Joined: Wed Jul 12, 2017 9:28 pm

Re: Writer – Sharing Macro Template Document?

Postby Zizi64 » Tue Aug 29, 2017 10:35 am

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; LO4.4.7, LO6.1.6 on Win7-10 x64Prof.
PortableApps, winPenPack: LO3.3.0-6.2.4; AOO4.1.5
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.
User avatar
Zizi64
Volunteer
 
Posts: 8055
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 6 guests