I wish to add an option which runs a macro to a Visio document's context menu. To do this, I have added a row to the Actions section of its shapesheet, with "Do X" in the Menu column. I can now see this option in the context menu when I right-click on the diagram. I tried adding '=CALLTHIS("ThisDcument.Test",,)' (without the single quotes) to the Action column, to run a public sub of that name in ThisDocument, but it won't persist - when I tab on from the column, its value reverts to 0.
I'm sorry if I'm missing the obvious, but can anyone suggest what I'm doing wrong and what I need to do to correct it?
Please check correct syntax

Your sub-routine in VBA-code must have Shape reference like
Sub test(sh As Shape)