File path for Linked Picture

  • Thread starter Thread starter Dougal2345
  • Start date Start date
D

Dougal2345

I am trying to find the file paths of pictures that have been inserted onto a
worksheet using the "Link to File" option. (I'm doing this in c# incidentally)

Here is how I do it for a PowerPoint file:

foreach (PowerPoint.Shape shape in slide.Shapes)
{
if (shape.Type.Equals(MsoShapeType.msoLinkedPicture))
{
String fileName = shape.LinkFormat.SourceFullName;
//do other stuff
}
}

I thought Excel would be effectively identical (obviously substituting
Worksheets for slides) but it seems to be missing the all-important
"SourceFullName" property from LinkFormat!

Any idea where I might find the source file path? Thanks!
 
Dougal2345 said:
I thought Excel would be effectively identical (obviously substituting
Worksheets for slides) but it seems to be missing the all-important
"SourceFullName" property from LinkFormat!

Anyone have any thoughts on this? Don't be put off by the c# code, I will be
happy with a VBA example :-)
 
Back
Top