Question : In VBA (MS-Word) need to know how to find the name of a drawing object(s).

In VBA (MS-Word) need to know how to find the name of a drawing object(s) on a Word Doc, and ref it in VBA. I want to make the object visible or invisible depending on additial code that indicates the condition. I need to show switch positions ON or OFF. (ON hoz .line visible) (OFF Diag. line visible.)

Answer : In VBA (MS-Word) need to know how to find the name of a drawing object(s).

I don't belive you can but as a fallback you can give them your own name so they are easier to relate to:

activedocument.Shapes(1).Name = "Fred"
activedocument.Shapes("Fred").Visible = false
activedocument.Shapes("Fred").Visible = true
or
application.Selection.ShapeRange.name = "Doris"
activedocument.Shapes("Doris").Visible = false
activedocument.Shapes("Doris").Visible = true

Chris
Random Solutions  
 
programming4us programming4us