Visio Guy

Visio Discussions => Programming & Code => Topic started by: Visisthebest on December 27, 2020, 02:34:33 PM

Title: Reading shapesheet info from a Master, like the Width and Height Cell
Post by: Visisthebest on December 27, 2020, 02:34:33 PM
Master objects in Stencils do not have the Shape.Cells property that I would normally use to read the Width and Height of the 'shape' that is (in) the master.

Is there a way to read the Width and Height of the 'shape' that is (in) the Master in the stencil or can this only be read by dropping the master on the page and checking the Width and Height of the shape?
Title: Re: Reading shapesheet info from a Master, like the Width and Height Cell
Post by: Croc on December 27, 2020, 02:47:14 PM
The master is equivalent to a page.
The page contains a shape (or shapes).
More or less like this
Code
Debug.Print Activedocument.Masters(1).PageSheet.Cells("PageWidth")
Debug.Print Activedocument.Masters(1).Shapes(1).Cells("Width")
Title: Re: Reading shapesheet info from a Master, like the Width and Height Cell
Post by: Visisthebest on December 28, 2020, 05:26:38 AM
Thank you Croc I wouldn’t have guessed that really good to know how to read Width and Height directly from a Master!