File path for Linked Picture

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!
 
D

Dougal2345

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top