ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Get msoLinkedPicture LinkFormat? (https://www.excelbanter.com/excel-programming/356986-get-msolinkedpicture-linkformat.html)

thebubblejungle

Get msoLinkedPicture LinkFormat?
 
Hi all,

I have an Excel file that contains tick and cross images that are
sourced from the web, and I was wondering if there was a way to extract
the URLs of the images with VB? I checked the MSDN but there doesn't
seem to be a SourceName property for the object.

In context I'm trying to replace the tick images with the value 1 and
crosses with 0.

Regards,

m


[email protected]

Get msoLinkedPicture LinkFormat?
 
I can't find a way to do this with a pic inserted from file (using
webadress as a filename) but if you can identify any physical
differences between the pics, eg Horizontal size, you could use that to
determine whether to replace with 1 or 0.
Otherwise, perhaps you can query the filesize which may vary if the
pics are not .BMP.

Good luck.


thebubblejungle

Get msoLinkedPicture LinkFormat?
 
wrote:

I can't find a way to do this with a pic inserted from file (using
webadress as a filename) but if you can identify any physical
differences between the pics, eg Horizontal size, you could use that to
determine whether to replace with 1 or 0.
Otherwise, perhaps you can query the filesize which may vary if the
pics are not .BMP.

Good luck.


If only there were distinguishing features between the two, not even
the defined names of the Shapes help! I was quizzed about this whilst
doing another IT job for a company so I hope I can find an answer,
they'd be dead chuffed! Just looked at a BreakLink method for OLE
objects but not sure whether this is what I'm looking for...

m


[email protected]

Get msoLinkedPicture LinkFormat?
 
How are the images linked to the document? Do they still appear if
there is no internet connection available?
Are you able to see the information you require by manually viewing
properties for the picture, eg Alternate Text?

How many pictures does the doc contain, you may need to do it manually
amd recommend using Wingdings font for ticks and crosses next time!


thebubblejungle

Get msoLinkedPicture LinkFormat?
 
I really can't work out how they're linked!

The file appears to be created automatically from an .aspx document
with the images in place. Without an Internet connection the pictures
don't appear, but I can't find any information on the linkages at all.
I exported the file to HTML and the links were there, so they must be
held by Excel somewhere...

The documents contain on average around 2000 images!

m


[email protected]

Get msoLinkedPicture LinkFormat?
 
Perhaps rather than opening the file directly into Excel you can try
importing the file as a New Web Query via Data Import External Data?

If that works you can clean up any spurious data with VBA or simply
copy relevant data to a clean sheet with VBA. It would certainly be
easy to analyse a particular column to retrieve parts of a URL for you
ticks or crosses.


thebubblejungle

Get msoLinkedPicture LinkFormat?
 
That nearly worked, good suggestion but it simply just removed all
image references. I ran ActiveWorkbook.LinkSources(xlOLELinks) and that
says I have no LinkSources, that is totally messed up because I know
they are there!

I think I better get some sleep, something might come to me during the
night.

m



All times are GMT +1. The time now is 11:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com