Customizing the Context(right click) Menu

Started by renosis, February 01, 2012, 03:22:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


My co-worker is trying to adjust to Visio 2010, but some things, apparently, he can't live without. He is coming from Visio 2003... and on Visio 2003, you could right click any shape and rotate it from the menu. Well, 2010 doesn't have this feature, and I can't find a way to add it(or anything for that matter!) to the right click menu(context menu I guess it is called).  I have added Rotate to his ribbon and also showed him the "Size & Position" box... where you can specify exact angles. But he still wants the right click rotate.

Does anyone know of a way to customize this menu?



I can see four scenarios for this
a.) create a custom stencil with modified versions of all of the shapes that the user might want to use (complicated). This is putting an action row in for each of the functions the user wants.
b.) create custom code that executes based on a right mouse click that creates the custom context menu (more complicated)
c.) put the necessary command buttons in the quick access bar so they are always available (easy).
d.) tell them 'things change, get used to it' (very insensitive, and not advised)



You can customise the context menus via the fluent UI (ribbon) xml.

<?xml version="1.0" encoding="utf-8"?>
<customUI xmlns="">
    <contextMenu idMso="ContextMenuShape">
      <button id="xx" label="Rotate" showLabel="true" enabled="true" visible="true" onAction="OnActionButton"/>

You could load this via ThisDocument.customUI or via the RegisterRibbonX.

Obviously you will also need VBA to handle the onAction and do the shape rotation
Live life with an open mind