i want add my action by docmd in right menu

Started by xiamen168, August 25, 2015, 03:09:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xiamen168

i want add my action by docmd in right menu,
how to setup it to let this docmd canbe call my VBA function ?

shapesheet actions
docmd(xxx)   ->  VBA 's function myfun()

regards!

wapperdude

#1
Don't think that's possible with DOCMD.  Here's a list of allowed commands:  https://msdn.microsoft.com/en-us/library/aa342178.aspx.

But, you can use RUNMACRO or CALLTHIS in the Actions section of the shapesheet.  For example, add =RUNMACRO ("ThisDocument.MyMacro") in the Action cell.  Add STH like "My Macro" in the menu cell.

Then, when you right click the shape, click My Macro, and the macro will execute.

Info on shapesheet functions can be found here:  https://msdn.microsoft.com/en-us/library/ms427031(v=office.12).aspx

Wapperdude
Visio 2019 Pro

xiamen168

[in the Actions section of the shapesheet] i knowed,
but i want docmd :'( :'( :'( No way!

thanks!!!



xiamen168

Add STH like "My Macro" in menu!!!
i got it

thanks wapperdude !!!