My own macros not secure anymore?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

My own macros not secure anymore?

Post by Ponny »

OpenOffice 4.1.12, when I want to stard macro, I made it.....
From today always prevent me to start my own macro.
Then I lowered security to "Ask before start".
Now ask me always, but I wrote this macros.
Why?

What should I do to stop this at running my own macros?
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Zizi64
Volunteer
Posts: 11352
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: My own macros not secure anymore?

Post by Zizi64 »

It is depends on where you store your macros. The macros embedded into a document will raise the security question at the "Medium" security level. The macros in the MyMacros of the office suite will not.
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.
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: My own macros not secure anymore?

Post by Ponny »

I always store macros in c:\Users\Matic\AppData\Roaming\OpenOffice\4\user\basic\.
Never in file. But until today OpenOffice never blocked macros from runnung.
And I wrote all my macros with my own poor hands.
Why are now my own macros usnecure?

P.s.: Aha, where, can I see, if any macros maybe in file?
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Zizi64
Volunteer
Posts: 11352
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: My own macros not secure anymore?

Post by Zizi64 »

P.s.: Aha, where, can I see, if any macros maybe in file?
Maybe there are. Check it. It is enough an empty Module.
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.
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: My own macros not secure anymore?

Post by Ponny »

Now, I found it. But there is ni macros. Empty.
I put macro security level to minimum. But this is not good solution.
What now?
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Zizi64
Volunteer
Posts: 11352
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: My own macros not secure anymore?

Post by Zizi64 »

Delete the empty Module, or copy all of the content of the document into a new file what not contain any Module.
You can delete the modules by usage of the Macro organizer. (I Just tried it in my LibreOffice 6.1.6: it works. The message will not appeared after deleting all of the Modules.

Or, please upload/share your file here.
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.
Bidouille
Volunteer
Posts: 574
Joined: Mon Nov 19, 2007 10:58 am
Location: France

Re: My own macros not secure anymore?

Post by Bidouille »

Ponny wrote: Sun Jun 05, 2022 12:45 pm Why are now my own macros usnecure?
Macro security has been enhanced with 4.1.12
You can add a trusted location in Tools > Options
Or better, build an extension.
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: My own macros not secure anymore?

Post by Ponny »

I added trusted location, as mentioned before. But no effect. Then I changed security level to minimum. But, I think, this is no good idea. But what should I do?

About extension. I not quite understand, what is this.

Aha, I found now in file ODT library named Standartd. But, I can't delete it. Button Delete is grayed and I can't use it.
This Library I found just in file ODT, but not in template OTT.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
Bidouille
Volunteer
Posts: 574
Joined: Mon Nov 19, 2007 10:58 am
Location: France

Re: My own macros not secure anymore?

Post by Bidouille »

Ponny wrote: Sat Jun 11, 2022 1:09 pm I added trusted location, as mentioned before. But no effect.
Could you give us more details?
We are not behind you to see what you did.
Provide screenshots to each step.
Ponny wrote: Sat Jun 11, 2022 1:09 pm About extension. I not quite understand, what is this.
You can use BAB: https://extensions.openoffice.org/en/pr ... s-packager
jimthegeezer
Posts: 10
Joined: Fri Jul 26, 2013 8:41 pm

Re: My own macros not secure anymore?

Post by jimthegeezer »

For those of us who used the WindowsStates.py macro (years and years ago) to save the size and position of our OO applications on the screen and are now bedevilled with warning notices and loud plings when we open our documents with the nice new 4.1.12, the good news is:

- 4.1.12 (at last!) saves the size and position of the screen displays without the assistance of this or any other old macro,

- it's quick and easy to deactivate the old macro, as follows:-

After you open your document and get rid of the warning notice:
Click on Tools -> Customise -> Events
Click on each "Assigned Action" which refers to "WindowsStates.py" and the click on the "Remove" utton
When you've cleared them all, click on "OK" and save the document.

There may be other macros about which I can't vouch for !! (this one was of course perfectly harmless....)
Open Office Org 3.4.1
OS Name Microsoft Windows 7 Home Premium
Version 6.1.7601 Service Pack 1 Build 7601
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: My own macros not secure anymore?

Post by Villeroy »

User "Ponny" lied about his office version. He/She uses LibreOffice. There is no reason to hide away an upgrade to LibreOffice.
I'm sorry that I did not notice that most recent versions of AOO does the same thing.
Since LO version 7 (and AOO version 4.11?) the office suite does not call any macros if the calling document is stored in an untrusted directory. This makes perfect sense because with the old setup an evil attacker may be able to drop some code into the user profile and then let the user load some document which does not contain any macros but calls the previously installed macro code.

1) Set the security level to "Highest" (anything else makes no sense).
2) Add as many trusted directories as you need. Each trusted directory includes all of its subdirectories. DO NOT add your Downloads directory since this directory contains anything from anywhere.
Last edited by Villeroy on Wed Jul 27, 2022 8:48 pm, edited 1 time in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
nickGiard
Posts: 16
Joined: Fri Nov 10, 2017 5:57 pm

Re: My own macros not secure anymore?

Post by nickGiard »

If you want see all macro in your document, also events, save the file in .fods format, open with Notepad e look for <office:scripts> tag. There there are all scripts.
LibreOffice 6.3 on Windows 10 64bit
Mountaineer
Posts: 310
Joined: Sun Sep 06, 2020 8:27 am

Re: My own macros not secure anymore?

Post by Mountaineer »

If you suggest .fodt, you should also link to
https://forum.openoffice.org/en/forum/v ... 47&t=44216

As a recent discussion showed here ( https://forum.openoffice.org/en/forum/v ... p?t=108147 ): AOO doesn't support .fodt, but Zizi found above extension.
OpenOffice 3.1 on Windows Vista
Post Reply