So I've finally decided to jump into the CQL Query pool and I'm amazed at it's speed. I like it!!! [:D]So I'm going through my code and simplifying it with CQL where ever it can be applied. I'm stuck on one area. I know how to query for a specific size and height but I'm confused a s to how to get the height from the selected shape. I tried storing the height and width of the shape in a variable but I kept getting an error. I also tried converting it into a string but that failed as well. Any help would be grealty appreciated.
Thanks
Lei
Try following code - finds all shapes with same height (incl.units) and duplicate them on x+100, y+100
Sub Macro1()Dim sr As ShapeRangeActiveDocument.Unit = cdrMillimetersh = ActiveSelection.SizeHeightSet sr = ActivePage.Shapes.FindShapes(Query:="@height = {" & sh & "mm" & "}")sr.Duplicate 100, 100End Sub
Best regards
Mek
You're welcome, M.