Greetings,
We are using OpenOffice 4.1.13 at my company. I am an IT person and we have a script to install OO on computers, but we also need to either set the Macro security level to MEDIUM OR set a Trusted Source/Location. Obviously this can be done pretty easily within the softwares UI, but we would like to automate this so additional steps are not necessary.
Does anyone have experience with this and would care to share their solution? I found a similar thread from like 9 years ago where someone created a script to do just this. I have tested said script and modified it a bit but have had no success in getting it to work.
Thank you in advance!
Automate setting Macro Security Level or Trusted Locations
-
- Posts: 3
- Joined: Wed Nov 30, 2022 10:34 pm
Automate setting Macro Security Level or Trusted Locations
OpenOffice 4.1.13 on Windows 10
- Hagar Delest
- Moderator
- Posts: 32661
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Automate setting Macro Security Level or Trusted Locations
Hi and welcome to the forum!
Maybe you can post the link to the other thread so that we see what kind of code it is and what would have to be changed.
Note: have you considered LibreOffice? For a company, it may sound a better option.
Maybe you can post the link to the other thread so that we see what kind of code it is and what would have to be changed.
Note: have you considered LibreOffice? For a company, it may sound a better option.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
- MrProgrammer
- Moderator
- Posts: 4906
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Automate setting Macro Security Level or Trusted Locations
I find those settings in the user profile in file registrymodifications.xcu. A script could modify the settings if OpenOffice is not running. Try changing these two (or perhaps other properties in the same path). What security level does value 2 represent? What syntax is required for a Trusted Source URL? For multiple URLs? I don't know but you can experiment.OOUser7200 wrote: ↑Wed Nov 30, 2022 10:40 pm set the Macro security level to MEDIUM OR set a Trusted Source/Location
You're more likely to get help if you attach the script (not a picture of it) that you used and explain in detail what "no success" means. Script failed with an error message? What was the exact text of the error message? Script ran but it broke OpenOffice? Script ran but it didn't change the settings? Script ran but it changed settings you didn't want changed? Computer burst into flames? What command did you use to call the script? Etc. We don't know what happened. You do, but you don't tell us.
If this solved your problem please go to your first post use the Edit ☐ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
-
- Posts: 3
- Joined: Wed Nov 30, 2022 10:34 pm
Re: Automate setting Macro Security Level or Trusted Locations
Sure thing, here you go:Hagar Delest wrote: ↑Wed Nov 30, 2022 10:49 pm Hi and welcome to the forum!
Maybe you can post the link to the other thread so that we see what kind of code it is and what would have to be changed.
Note: have you considered LibreOffice? For a company, it may sound a better option.
https://forum.openoffice.org/en/forum/v ... hp?t=12525
A user name Bobban made the script.
OpenOffice 4.1.13 on Windows 10
-
- Posts: 3
- Joined: Wed Nov 30, 2022 10:34 pm
Re: Automate setting Macro Security Level or Trusted Locations
Thank you for your response. I will look into that, thanks!
I just posted a link in a different reply (to someone else) to the original topic where someone posted a script in there. I ran the script and it had absolutely no change to the macro settings. I noticed in the script that it had some references to "OpenOffice.org\3\user\registry\data\org\openoffice\Office". I believe the correct path with the most current OO is OpenOffice.org\4\user\registry\data\org\openoffice\Office" so I did change all the instances in the script and re-ran but still no changes.
I just posted a link in a different reply (to someone else) to the original topic where someone posted a script in there. I ran the script and it had absolutely no change to the macro settings. I noticed in the script that it had some references to "OpenOffice.org\3\user\registry\data\org\openoffice\Office". I believe the correct path with the most current OO is OpenOffice.org\4\user\registry\data\org\openoffice\Office" so I did change all the instances in the script and re-ran but still no changes.
MrProgrammer wrote: ↑Thu Dec 01, 2022 12:00 amI believe you'll find those settings in the user profile in file registrymodifications.xcu. A script could modify the settings if OpenOffice is not running. Try changing these two (or perhaps other properties in the same path). What security level does value 2 represent? I don't know but you can experiment.MacroSecurityLevel.pngSecureURL.pngOOUser7200 wrote: ↑Wed Nov 30, 2022 10:40 pm set the Macro security level to MEDIUM OR set a Trusted Source/Location
You're more likely to get help if you attach the script (not a picture of it) that you used and explain in detail what "no success" means. Script failed with an error message? Script ran but it broke OpenOffice? Script ran but it didn't change the settings? Script ran but it changed settings you didn't want changed? Computer burst into flames? We don't know what happened. You do, but you don't tell us.
If this solved your problem please go to your first post use the Edit ☐ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
OpenOffice 4.1.13 on Windows 10
-
- Posts: 318
- Joined: Sun Sep 06, 2020 8:27 am
Re: Automate setting Macro Security Level or Trusted Locations
I don't have an english source for this, but read an article several years ago, where the suggestion is to modify/extend the installation, not the configuration of an existing install.OOUser7200 wrote: ↑Wed Nov 30, 2022 10:40 pm ...,
but we would like to automate this so additional steps are not necessary.
Does anyone have experience with this and would care to share their solution?
...
To avoid own modifications to be erased with the next version it was suggested to create additional.xcd-files instead of using modified.xcu-files.
My "knowledge" came from this german paper:
https://www.heise.de/select/ix-special/archiv/2015/2#!
For OpenOffice there is an admin guide available at
https://wiki.openoffice.org/wiki/Docume ... ctionality
wich also hints modified xml-files.
OpenOffice 3.1 on Windows Vista