Hi,
I wrote a Basic macro that I wish to password protect (so far so good)
Now that macro will be called from another program with something like:
run c:\LibreOfficePortable\LibreOfficeCalcPortable.exe macro:///MyLibrary.MyModile.MacroName(...,...)
Works fine if the Library is not password protected but fails if the library is password protected because LOo can't access the Macro.
Is there a way to specify the password in the command line ?
I'd like to prevent user modification of my macro because I know one of then will surely break it
Thanks in advance.
[Solved] Run password protected macro from command line
[Solved] Run password protected macro from command line
Last edited by Ragnarson on Fri Apr 24, 2015 9:28 am, edited 1 time in total.
LibreOffice Portable 4.4.2.2 On Windows 7
-
- Volunteer
- Posts: 1160
- Joined: Mon Oct 08, 2007 1:26 am
- Location: France, Paris area
Re: Run password protected macro from command line
Hi,
It should be possible to call a macro of a protected library, without knowledge of password (or else, why bother with a password that everyone knows?). I did not test, it may be a bug of LibreOffice.
It should be possible to call a macro of a protected library, without knowledge of password (or else, why bother with a password that everyone knows?). I did not test, it may be a bug of LibreOffice.
Bernard
OpenOffice.org 1.1.5 / Apache OpenOffice 4.1.1 / LibreOffice 5.0.5
MS-Windows 7 Home SP1
OpenOffice.org 1.1.5 / Apache OpenOffice 4.1.1 / LibreOffice 5.0.5
MS-Windows 7 Home SP1
Re: Run password protected macro from command line
I investigated further, look loike I can call macros from command line in a password protected library it's just I can't call the one I wrote.
I've got a "Object non accessible. Invalid Object Reference." whan it's password protect and works fine when it's not.
I've got a "Object non accessible. Invalid Object Reference." whan it's password protect and works fine when it's not.
LibreOffice Portable 4.4.2.2 On Windows 7
Re: Run password protected macro from command line
I think I found the culprit.
I've got a custom type in my library (very simple one with a string and an integer).
For my tests I made a simple function with a string argument and MsgBox the argument
Works password protected and not password protected
Second test same thing but with the custom type in action, I assign my argument to the string part of my custom type and that works in the unportected library and not in the protected one.
Now that would look like a bug to me.
I've got a custom type in my library (very simple one with a string and an integer).
For my tests I made a simple function with a string argument and MsgBox the argument
Works password protected and not password protected
Second test same thing but with the custom type in action, I assign my argument to the string part of my custom type and that works in the unportected library and not in the protected one.
Now that would look like a bug to me.
LibreOffice Portable 4.4.2.2 On Windows 7
Re: Run password protected macro from command line
I replace my custom type with something else (I used a beans.propertyvalue instead) and now it works like a charm even when the library is password protected.
I'm marking this thread as Solved
I'm marking this thread as Solved
LibreOffice Portable 4.4.2.2 On Windows 7