2
votes

I have a Word document that contains several images. The images are located on the hard drive in a sub-folder and they are linked into the Word document.

I would like to select an image and execute a macro which then opens a message box and lets me know the full path of the image.

1

1 Answers

0
votes

Here goes code for you:

Sub GetFullPath()

On Error Resume Next
    Dim fullPath As String
    fullPath = Selection.ShapeRange(1).LinkFormat.SourceFullName
    fullPath = Selection.InlineShapes(1).LinkFormat.SourceFullName
    MsgBox fullPath

End Sub