Can't select shapes via macro
I have a word documents created from a converted PDF. I'm trying to programatically select in turn the shapes within the document. If I create a test macro, place a break point in it with a watch expression ActiveDocument.Shapes.Count and run it I can see that there are >2000 of shapes in the document; however the code inside a 'for each shape...' loop never gets executed.
Note that if I copy and paste the shape into a new document the macro works.
The code I am using is:
Sub SelectShapes()
Dim sh As Shape
For Each sh In ActiveDocument.Shapes
sh.Select
'Will do some other things here
Next
End Sub
Any ideas what might be going on here?
Thanks!
|