Writer: Enable macros on document open to avoid prompt

I have associated a macro with the document.finishedloading event and have added that macro’s location to the applications trusted locations but on document open I am still prompted to enable macros.

How can I avoid that prompt?

You didn’t mention the level of your macro security. Is it High or above, only allowing signed macros (from trusted location on Very High level, or elsewhere on High); or is it Medium - allowing silent execution of any macros from trusted locations?

Medium: confirmation required before loading macros from untrusted sources.

To the trusted sources/trusted file locations, I have added the …/libreoffice/4/user//Scripts/python directory in which my macro is stored.

Do you configure your document.finishedloading event in the document, or globally in LibreOffice? In the former case, you need to add the document location to the trusted list - because as soon as the document is read, and it includes a reference to a macro (even stored elsewhere, in a trusted location, itself), it is the document’s location that defined the security warning - because it could be a malicious document from someone, who e.g. discovered a smart trick how to exploit a flaw in built-in macros.

Ah. that’s it. Thanks