I know turn on track changes by pymacro, but I want to set the protection password and i have no idea.
I’m not sure I can help you but maybe you need to do a UNO API query.
BTW here is some help on python scripting that maybe of some help help:
Thanks for your reply! But I still can’t find a solution.