Visio Guy

Visio Discussions => Programming & Code => Topic started by: kiler40 on March 31, 2015, 07:17:02 AM

Title: Select shape if visible
Post by: kiler40 on March 31, 2015, 07:17:02 AM
Hello everybody !
I have created a routine that selects all shapes in specific boundaries.
But i have a lot of hidden (Layers are controlling visibility) shapes.
Is there a way NOT TO select hidden one but just visible shapes ?

Thanks in advance !

Andrei
Title: Re: Select shape if visible
Post by: Yacine on March 31, 2015, 04:18:05 PM

Work with the selection of shapes of the active window, instead of the shapes of the page.

Sub test()
ActiveWindow.SelectAll
For Each shp In ActiveWindow.Selection
Debug.Print shp.Name
Next shp
Debug.Print "____"
For Each shp In ActivePage.Shapes
Debug.Print shp.Name
Next shp
End Sub


Title: Re: Select shape if visible
Post by: kiler40 on April 01, 2015, 03:31:43 AM
Ah...
select all, and after that deselect what is not in the range i`m interested in.
Thanks a lot !
This was something new :)