I'm trying to make a macro to select a rectangle considering its proportions instead of dimensions
My actual lines that work are:
Dim sr2 As ShapeRange Set sr2 = ActivePage.Shapes.FindShapes( _ Query:="@type = 'rectangle' and @width = {6 mm} and @height = {37.5 mm}")
sr2.CreateSelection
and I would like to find the rectangle even after resizing
I have tried:
Set sr2 = ActivePage.Shapes.FindShapes( _ Query:="@type = 'rectangle' and (@height / @width) = {6.25}")
but do not work
can somebody help me please?
I don't think you need the curly braces - {} - when you are not specifying a unit of measurement for a value.
Try using:
1
ActivePage.Shapes.FindShapes(Query:="@type = 'rectangle' and (@height / @width)=6.25")
IT WORKS !!!!!
Thank you very much Eskimo!!!!