Works great - thanks, Paul! I see you also included code to search all stories. Just what I wanted, except that when it gets to the footer (and presumably the header, if it contained an inline shape), it errors with 4605 ("This method or property is not available because the object refers to a header or footer").
Actually, I just realized that Word doesn't allow one to create captions for shapes in headers, footers, footnotes or endnotes, so I guess there's no benefit to having the code search all stories. But there are 17 stories, right? Perhaps it should have an error trap/message instead?
I'm sure I can adapt this code to do the same for tables, but shapes are different. The Intellisense for "For Each Shp In RngStry." is "shaperange", not "shapes," and "shaperange" doesn't work (when the variable is declared as a shape or shaperange). Can you advise what i need to do to make it work for shapes as well?
|