Shape should create new page if used

Started by urs63, November 26, 2015, 09:16:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

urs63

Does anybody know if a shape can be configured by its shapesheet (and not by VBA) in the way that it creates a new page when it will be used (dragged from its stencil)? If yes, what command/event I have to use?
Thanks

Surrogate

i am not sure that it possible via shapesheet  ::)

urs63

Hi

I might to remember that there were some shapes (backgrounds, I think) in a stencil in a earlier version of VISIO (2007?). If you used them they created a new page (as a background page)...

Paul Herber

Those shapes have the following formula in the EventDrop cell:
=RUNADDON("Make Background")+SETF("EventDrop",0)
This calls the Make Background addon. There is no equivalent to make a page.
Another way would have been to use DoCMD() to access the many commands within Visio's automation, however, the command to add a page (visCmdInsertPageTab = 2202) doesn't work from the shapesheet.
It should be possible to create a small add on to create a new page, and then call this when the shape is dropped.

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Yacine

#4
Just tested this code : RUNADDONWARGS("OPC","/CMD=1") ,
copied from an off-page-reference shape and pasted it in the double-click event of a virgin shape. It does create a new page.
Yacine

urs63

Thank you all especially Paul and Yacine! Have a good winter - here in France we already have snow...
Regards Urs

Yacine

#6
Et maintenant tu retournes dans ta caverne hiberner? Bon hiver à toi aussi ;) .

PS: the enclosed image shows snow made in Visio.
Yacine

Paul Herber

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/