Description: I've created a macro that works fine. Getting this macro assigned to a right-click menu has proven impossible. I'm left with copying the macro and pasting it into a module in the document. Organizer has been of no help. Seems to me there should be a better way. I've looked at the LibreOffice tutorials but they're focused on teaching new users how to write macros. I've looked at other tutorials, but mostly they're out of date. The documentation is unclear to say the lease. Steps to Reproduce: 1. Write a macro. 2. Attempt to get a new document to recognize the macro and execute it. 3. Actual Results: Confusion, no results Expected Results: I expected to be able to write a macro, assign it to a library, and execute it from a right-click menu. Reproducible: Always User Profile Reset: No Additional Info:
Olivier, possibly need to improve our documentation?
There must be some clarification on the usage of macro containers and context menus When you write a macro you can only store it in a library in My Macro container or in a library in the document. If you store in "My Macros" you can use the macro in every document you have open in your user profile. If you store the macro in the document, only that document will see it. The right click menu depends on the object context, that is, the right-click menu of an image is different of the right click menu of a comment, etc... Each object has a specific context menu and very few commands are common to several objects. If you have set an entry of you macro in a comment context menu, it will not be available in the image context menu. Nevertheless I'm amending the page below with a description of the container concept. https://help.libreoffice.org/6.4/en-US/text/sbasic/shared/01030400.html?&DbPAR=BASIC&System=UNIX
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/75af753c3f78948c40ce34c5f6d61584b7e931a9 tdf#128808 Clarify Basic libraries containers
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/help/commit/eee359bf03c95f84536f4bba3e340e366fe236f9 tdf#128808 Clarify Basic libraries containers