Embedded macro won't launch in Writer

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
John Riviera
Posts: 6
Joined: Wed Jul 13, 2022 10:37 am

Embedded macro won't launch in Writer

Post by John Riviera »

Hello,

I'm using some macros placed in the tool bar, some open a New Document from a model, others change the fonts' appearance.
If the document I'm launching these macros from has just been opened with +N, these macros will launch.
If the document I'm launching these macros from has been opened from a macro of these, the macros won't launch.

... wether these macros are embedded (built into the model, "onboard") or not. I've tried both methods.
... knowing I added the right trusted directory where the embedded macros models stand.
... knowing an OpenOffice macro won't launch either if executed from a document that has been open from a macro (but will if executed from a document opened with +N

I understand security about macros has been raised with 4.1.12 but why can I use theses macros in a "just freshly" +N opened New Document and not from macro-powered opened New Document ?

(I did not have this issue under 4.1.3 mais experiencing others problems that made me want to use 4.1.12)

I thank you in advance for any answer and help you can provide. I hope I made myself clear in the description.
John Riviera
OpenOffice 4.1.12 on MacOS 12.1.1
LibreOffice 7.2.7.2 (Intel) on MacOS 12.4 (M1)
User avatar
Mr.Dandy
Posts: 427
Joined: Tue Dec 11, 2012 4:22 pm

Re: Embedded macro won't launch in Writer

Post by Mr.Dandy »

OpenOffice 4.1.12 - Windows 10
John Riviera
Posts: 6
Joined: Wed Jul 13, 2022 10:37 am

Re: Embedded macro won't launch in Writer

Post by John Riviera »

Mr.Dandy wrote: Fri Jul 15, 2022 2:19 pm Just read the thread below yours: https://forum.openoffice.org/en/forum/v ... p?t=107865 :)
Yes, I should have said I actually did, and from what I could understand, define trusted directories is needed, which I did, with embedded macros. But still :roll: . The very first new document created when calling the .ott (which comes with the embedded macros) thru File -> New -> Text Document or +N will have"its" macros working fine, perfectly. And any time I create a New Document this way, macros launch fine.

But when creating a New Document by calling the very same .ott (as above) from an embedded macro, its macros won't launch. :evil:

Let's say Macro1 calls model1.ott , Macro2 calls model2.ott, Macro3 calls model3.ott, Macro4 saves the file under a specific file and a specific name, Macro5 applies specific changes to selected characters, and so on... each of these are called from a button in the tool bar.

Each of these macros are embedded in each of these 3 .ott.
If creating a New Document with +N, any of these macro will open a New Document, in which macros will launch.

But, for example, if calling Model3.ott from the "3" button in the tool bar, no macros will launch in this New Document.

Let me add a few more details :
- I don't experience this issue with LO7. I don't have to neither embed the macros nor define a trusted file to have these macros launching. And with Security set to "average", I only get a warning message when calling a .ott, not when using Macro 4 or 5.
- you'll ask me then : "why the hell are you wasting our time if you get no problem with LO ? Turn to LO and live your life, you @ù&%## !!". :ucrazy:

Because :
  1. I couldn't turn to LO (for M1) since Base was crashing on my M1-Mac, until I learned that LO for Intel-Mac worked fine on M1-Macs :super:
  2. I still don't understand this "preference" for +n-opened .ott for any macros to launch... :crazy:
John Riviera
OpenOffice 4.1.12 on MacOS 12.1.1
LibreOffice 7.2.7.2 (Intel) on MacOS 12.4 (M1)
User avatar
Mr.Dandy
Posts: 427
Joined: Tue Dec 11, 2012 4:22 pm

Re: Embedded macro won't launch in Writer

Post by Mr.Dandy »

I don't reproduce. An OTT opens a blank document on which embedded macros can be run.
John Riviera wrote: Fri Jul 15, 2022 4:00 pmLet's say Macro1 calls model1.ott , Macro2 calls model2.ott, Macro3 calls model3.ott,
I don' t understand why you need macros to run OTT. Create shortcuts since explorer or desktop.
OpenOffice 4.1.12 - Windows 10
John Riviera
Posts: 6
Joined: Wed Jul 13, 2022 10:37 am

Re: Embedded macro won't launch in Writer

Post by John Riviera »

Mr.Dandy wrote: Fri Jul 22, 2022 2:44 pm I don' t understand why you need macros to run OTT. Create shortcuts since explorer or desktop.
Because many of the macros I use do not only call an .ott, they also insert text into the newly created No Name, for example. I often need to select, for instance, a name and surname, open a specific .ott and insert the selection into a specific location, a frame usually... since I use this procedure many times a day for multiple document templates, I save a lot of time with macros.
John Riviera
OpenOffice 4.1.12 on MacOS 12.1.1
LibreOffice 7.2.7.2 (Intel) on MacOS 12.4 (M1)
User avatar
Mr.Dandy
Posts: 427
Joined: Tue Dec 11, 2012 4:22 pm

Re: Embedded macro won't launch in Writer

Post by Mr.Dandy »

Don't speak in a vacuum and povide this OTT.
OpenOffice 4.1.12 - Windows 10
Post Reply