How to Permanently Remove a Context Menu Item with a Macro

In a project I’m working on, I use Tools → Customize → Context Menus to add a macro I’ve written to the Table Context Menu of my Writer template. I can remove this item dynamically using a Context Menu Interceptor written in BASIC. But, in my project, a user may choose not to have some new functionality added to his odt document, and in that case the template removes the module with all the macros associated with that functionality. But I’m still left with that item in the Context Menu, even though it can never be used. I can continue to remove it via the Interceptor, but, as it can never be used anyway, I’d like to remove it permanently from the Table Context Menu using a macro from the template so that the resulting odt file no longer has the item in the menu.

Is this at all possible with a macro?