How to customize context menu in writer?

How can I customize the context menu? I want to add a macro in the context menu that appears when right-click over a document. Is it possible?

Have you read “menus;assigning macros” in the integrated Help ?

There’s a section called “To assign a script to a new menu entry”; one can create for example a new menu entry or a submenu.
However, you cannot customize context menus (right-click) from the GUI, it demands more digging (or an extension?).
http://wiki.documentfoundation.org/images/2/27/0114GS3-CustomizingLibO.odt

Thanks. I’ve already modified menu bar, and tools bar. If I understood you I can not modify context menu.

Thanks. I’ve already modified menu bar, and tools bar.