View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Image File Path for Linked Pictures

I got the name a little different than you were trying. I added awatch to
oshape and then open it up and started searching for the path.

Sub xyz()

Dim oShape As Shape
For Each oShape In ActiveSheet.Shapes
'If oShape.Type = msoLinkedPicture Then
abc = oShape.OLEFormat.Object.SourceName
Debug.Print oShape.OLEFormat.Object.SourceName
'End If
Next
End Sub

"Lazzaroni" wrote:

I am trying to return the full source path of image files for linked images
in an Excel spreadsheet (msoLinkedPicture).

The following code does not work, but it demonstrates what I am trying to do.

Dim oShape As Shape
For Each oShape In ActiveSheet.Shapes
If oShape.Type = msoLinkedPicture Then
Debug.Print oShape.LinkFormat.SourceFullName
End If
Next

Does anyone happen to know how to return a linked picture's source name?