View Single Post
 
Old 07-11-2022, 07:51 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote