Your ReferenceMyImages sub only loops through InlineShapes. But you ignore what the loop is doing and use both:
• PicPath = Selection.ShapeRange(1).LinkFormat.SourceFullName (which is invalid for inlineshapes); and
• PicPath = Selection.InlineShapes(1).LinkFormat.SourceFullNam e (which is only valid for images inserted as links),
and both reference Selection, which isn't necessarily related to any image in the document - what might be selected when the macro is run might just be some text.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|