Tip: how to get the shape size including its data graphics!

Started by Visisthebest, December 30, 2020, 11:28:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visisthebest

Turns out Visio 2016 did have a nice hidden surprise for those of us who needed this functionality!

The Master.VisualBoundingBox method was introduced in Visio 2016:
https://docs.microsoft.com/en-us/office/vba/api/visio.master.visualboundingbox

with this argument:
visBBoxIncludeDataGraphics

https://docs.microsoft.com/en-us/office/vba/api/visio.visboundingboxargs

You can get the size of the shape with its data graphics included!

I asked a question about this in the forum some time ago, after which I considered writing a custom function to do this. Fortunately never got to it and happy to find Microsoft solved it for us.
Visio 2021 Professional