Author Topic: Customizing the Context(right click) Menu  (Read 6795 times)

0 Members and 1 Guest are viewing this topic.

renosis

  • Newbie
  • *
  • Posts: 5
Customizing the Context(right click) Menu
« on: February 01, 2012, 10:22:10 AM »
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?

Thanks!

aledlund

  • Hero Member
  • *****
  • Posts: 1412
Re: Customizing the Context(right click) Menu
« Reply #1 on: February 02, 2012, 07:12:38 AM »
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)

:-)
al

AndyW

  • Sr. Member
  • ****
  • Posts: 326
    • PC Mimic Diagram
Re: Customizing the Context(right click) Menu
« Reply #2 on: February 02, 2012, 08:59:10 AM »
You can customise the context menus via the fluent UI (ribbon) xml.

<?xml version="1.0" encoding="utf-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
  <contextMenus>
    <contextMenu idMso="ContextMenuShape">
      <button id="xx" label="Rotate" showLabel="true" enabled="true" visible="true" onAction="OnActionButton"/>
    </contextMenu>
  </contextMenus>
</customUI>

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