G
Gary
I am trying to select all objects bounded by coordinates on a page.
I was trying to use BoundingBox Method and it seems not to work for me.
Could it be my x and y coordinates on the right, left, bottom, and top?? I
have a 8.5x11 sheet of paper and its broken up into 15 rectangles. I use the
size & position window in Visio to get the x and y coordinates in inches.
Can someone help here!!!
Below if the VBA Macro from Visio that I was using to test. The PagObj is
P1 which is the page 1 of the visio document. I am trying to select all
objects given in the coordinates of .6" from the left side, 8.4" down from
the top, 3.05" on the right side, and 10.54" from the top.
When I view my visio document, nothing was selected. No error to my
knowledge.
Can someone help !
Thanks,
Gary
Sub Macro1()
Dim x As String
Dim DocObj As Visio.Document
Dim PagsObj As Visio.Pages
Dim PagObj As Visio.Page
Set DocObj = ActiveDocument
Set PagsObj = DocObj.Pages
For Each PagObj In PagsObj
ActiveWindow.Page = PagObj.Name
z = ActivePage.Shapes("Fm.1").Text
Debug.Print z
PagObj.BoundingBox visBBoxExtents, 0.6, 8.4, 3.05, 10.54
Next PagObj
End Sub
I was trying to use BoundingBox Method and it seems not to work for me.
Could it be my x and y coordinates on the right, left, bottom, and top?? I
have a 8.5x11 sheet of paper and its broken up into 15 rectangles. I use the
size & position window in Visio to get the x and y coordinates in inches.
Can someone help here!!!
Below if the VBA Macro from Visio that I was using to test. The PagObj is
P1 which is the page 1 of the visio document. I am trying to select all
objects given in the coordinates of .6" from the left side, 8.4" down from
the top, 3.05" on the right side, and 10.54" from the top.
When I view my visio document, nothing was selected. No error to my
knowledge.
Can someone help !
Thanks,
Gary
Sub Macro1()
Dim x As String
Dim DocObj As Visio.Document
Dim PagsObj As Visio.Pages
Dim PagObj As Visio.Page
Set DocObj = ActiveDocument
Set PagsObj = DocObj.Pages
For Each PagObj In PagsObj
ActiveWindow.Page = PagObj.Name
z = ActivePage.Shapes("Fm.1").Text
Debug.Print z
PagObj.BoundingBox visBBoxExtents, 0.6, 8.4, 3.05, 10.54
Next PagObj
End Sub