How to make web image on Excel worksheet permanent

A

ARG

Using Excel 10 and Windows 7

Hello all,

I have a macro that uses the code
Worksheets("List").Pictures.Insert (URL)
to grab an image from the web and paste it into the selected cell. The image is then saved within the excel file. So far so good.

Whenever the excel file is opened again, however, Excel connects to the origin of the web image and reloads the image.

I want to make the image permanent, as if it had been pasted using copy&paste. I don't want Excel to reload every time I open the file.

I checked under picture properties and file properties, but could find anything. I checked under Data->Connections, but nothing is listed there.

Any ideas?

Regards
ARG
 
M

Martin Brown

Using Excel 10 and Windows 7

Hello all,

I have a macro that uses the code
Worksheets("List").Pictures.Insert (URL)
to grab an image from the web and paste it into the selected cell. The image is then saved within the excel file. So far so good.

Whenever the excel file is opened again, however, Excel connects to the origin of the web image and reloads the image.

I want to make the image permanent, as if it had been pasted using copy&paste. I don't want Excel to reload every time I open the file.

I checked under picture properties and file properties, but could find anything. I checked under Data->Connections, but nothing is listed there.

Any ideas?

I would be inclined to try (untested) something like

Worksheets(1).Shapes(1).Copy
Worksheets(1).Shapes(1).Delete
Worksheets(1).PasteSpecial

I think by default that removes any links to the data source.
Else use it with Link:=False to force dropping links.

You probably ought to check that Shapes(1).Name contains "Picture" too.
If it works OK then iterate over the shapes.
 
A

ARG

I would be inclined to try (untested) something like



Worksheets(1).Shapes(1).Copy

Worksheets(1).Shapes(1).Delete

Worksheets(1).PasteSpecial



I think by default that removes any links to the data source.

Else use it with Link:=False to force dropping links.



You probably ought to check that Shapes(1).Name contains "Picture" too.

If it works OK then iterate over the shapes.



--

Regards,

Martin Brown

Hi Martin,

thanks, that worked. I only tried the copy/delete/pastespecial part, which pasted all images into the same selected cell, but now the reloading actions is gone which is good. I'll work on the repositioning :)

Best regards
arg
 
A

ARG

Hi Martin,



thanks, that worked. I only tried the copy/delete/pastespecial part, which pasted all images into the same selected cell, but now the reloading actions is gone which is good. I'll work on the repositioning :)



Best regards

arg

Martin,

Inspired by your copy/delete/paste action, I just tried the manual version of this:

click on one picture to select it.
CTRL + A to select all pictures on worksheet
CTRL + C
DEL
Paste as Image.

1) Pictures pasted to their original position
2) No more reloading action at opening.

Perfect.

The DEL makes all the difference.

Thanks again.
ARG
 

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