Reputation: 1181
I use the following code to insert a logo into an excel chart:
ActiveChart.Pictures.Insert("path\logo.jpg").Select
I see the logo and everything is fine from my point of view. But if i send this file via e-mail to a collegue which doesn't have access to the path he cannot see the picture. From this evidence i conclude that the code references the picture instead of inserting it.
How does one insert a picture permanently, such that the logo will be visible even if the path is not accessible anymore?
Upvotes: 1
Views: 333
Reputation: 1065
To embed the image in the file you have to add a shape and then put the image in the shape using AddPicture
Application.ActiveSheet.Shapes.AddPicture "C:\documents\somepicture.jpg", False, True, 1, 1, 100, 100
This example comes from here
MSDN also has some information here
Upvotes: 2