Open password protected file via command line

Hi,

Been trying to look at the list command line arguments in opening a Calc file in Libreoffice through command line but I could not find an argument for opening a password protected file. Can anyone tell me if this is possible and if so how to do this?

Thanks.

Hello @arjereza,

Such a password parameter does not currently exist for the command line. I think that this is for safety reasons to ensure that the password is manually entered into the Password Dialog when the file opens.

With Regards, lib

Thanks for the response. Just wanted to be sure had a hunch it was not implemented due to security.

Write a macro that calls loadComponentFromURL with property Password. There is an explanation at Handling Documents - Apache OpenOffice Wiki.

Then call the macro from the command line, as for example How to run libre scripts from linux command line?.

Thanks. Will try this.

But then you make fun of @librebel, who just said it is not possible due to security.