How to select ALL shapes linked to rows with a specific value

Started by fahnoubi, November 27, 2014, 02:04:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fahnoubi

Dear people,

so I have a huge Visio diagram where every shape is linked to a row in a table. I would like to select all the shapes that are linked to a row that has "X" as a value for a specific column, so I can change the color of these shapes. Is there an easy way to do this?

Thanks! :D

Yacine

Fastest would be a small macro:
activewindow.desellectall
for each shp in activepage.shapes
  if shp.cellexists("prop." & "RowSoAndSo", visexistsanywhere) then
    if shp.cells("prop." & "RowSoAndSo").resultstr("") = chr(34) & "X" & chr(34) then 'not sure about the chr(34) - depends on the field.
      activewindow.select shp visselect
    endif
  endif
next shp

You end up with the desired shapes selected and can apply the desired modifications. (Or set it to a new layer, so you can re-select the shapes later by their layer.
Yacine