ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to make web image on Excel worksheet permanent (https://www.excelbanter.com/excel-programming/448612-how-make-web-image-excel-worksheet-permanent.html)

ARG

How to make web image on Excel worksheet permanent
 
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

Martin Brown

How to make web image on Excel worksheet permanent
 
On 17/04/2013 04:30, ARG wrote:
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.

--
Regards,
Martin Brown

ARG

How to make web image on Excel worksheet permanent
 
On Wednesday, April 17, 2013 1:59:17 PM UTC+7, Martin Brown wrote:
On 17/04/2013 04:30, ARG wrote:

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.



--

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

ARG

How to make web image on Excel worksheet permanent
 
On Wednesday, April 17, 2013 3:55:07 PM UTC+7, ARG wrote:
On Wednesday, April 17, 2013 1:59:17 PM UTC+7, Martin Brown wrote:

On 17/04/2013 04:30, ARG wrote:




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.








--




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


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


All times are GMT +1. The time now is 06:50 AM.

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