Author Topic: Putting CALLTHIS subs in the shape context menu on a keyboard shortcut  (Read 349 times)

0 Members and 1 Guest are viewing this topic.

Visisthebest

  • Sr. Member
  • ****
  • Posts: 296
I am very fond of using CALLTHIS to add functionalities in the right-click menu of a shape (with the underlying code in the stencil).

Is it possible to add keyboard shortcuts to these, so that if a user selects a shape those keyboard shortcuts will activate the specific CALLTHIS call?

Thank you for your help and advice!
Visio 2021 Professional

Surrogate

  • Hero Member
  • *****
  • Posts: 1166
    • ShapeSheet™ Knowledge Base
Re: Putting CALLTHIS subs in the shape context menu on a keyboard shortcut
« Reply #1 on: January 10, 2021, 08:15:58 AM »
Sub-routine which call via CALLTHIS must have parameters


from Visio 2002 Developer's Survival Pack (by Graham Wideman)
« Last Edit: January 10, 2021, 08:47:11 AM by Surrogate »

Visisthebest

  • Sr. Member
  • ****
  • Posts: 296
Re: Putting CALLTHIS subs in the shape context menu on a keyboard shortcut
« Reply #2 on: January 10, 2021, 08:57:39 AM »
Thank you surrogate I've been using CallThis for a long time (I didn't realize that CALLTHIS doesn't have the VBA reference issues, it just works so forgot about it).

The question is, can I tie the menu item on the shape using CALLTHIS to a keyboard shortcut key (so the user can activate it with a keyboard shortcut)?

Visio 2021 Professional

Surrogate

  • Hero Member
  • *****
  • Posts: 1166
    • ShapeSheet™ Knowledge Base
Re: Putting CALLTHIS subs in the shape context menu on a keyboard shortcut
« Reply #3 on: January 11, 2021, 05:25:19 AM »
The question is, can I tie the menu item on the shape using CALLTHIS to a keyboard shortcut key (so the user can activate it with a keyboard shortcut)?
Oh, I'm sorry! I'm russian and I didn't understand your question :(
Not sure that we can use keyboard shortcuts from external stencil. Sometime i create master-shapes with context menu, this menu can call sub-routines from vss-file and have shortcut in context menu.

I call macro when press menu key on keyboard (≣ Menu) and "q"

Visisthebest

  • Sr. Member
  • ****
  • Posts: 296
Re: Putting CALLTHIS subs in the shape context menu on a keyboard shortcut
« Reply #4 on: January 11, 2021, 05:57:24 AM »
Thank you surrogate this is also a useful solution to use the context menu faster via the keyboard! I don't have the menu key on this particular keyboard but I can no doubt assign it to a key and use it.
Visio 2021 Professional

Surrogate

  • Hero Member
  • *****
  • Posts: 1166
    • ShapeSheet™ Knowledge Base
Re: Putting CALLTHIS subs in the shape context menu on a keyboard shortcut
« Reply #5 on: January 11, 2021, 06:54:14 AM »
You can use Shift+F10 instead Menu Key

7 years we have there same thread....
« Last Edit: January 18, 2021, 08:58:46 AM by Surrogate »

Visisthebest

  • Sr. Member
  • ****
  • Posts: 296
Re: Putting CALLTHIS subs in the shape context menu on a keyboard shortcut
« Reply #6 on: January 11, 2021, 07:28:20 AM »
Thank you for the tip Surrogate!
Visio 2021 Professional

Visisthebest

  • Sr. Member
  • ****
  • Posts: 296
Re: Putting CALLTHIS subs in the shape context menu on a keyboard shortcut
« Reply #7 on: January 11, 2021, 08:46:51 AM »
Solution I am using in addition to Surrogate's tip:
http://visguy.com/vgforum/index.php?topic=9413.0
Visio 2021 Professional