xlApp.activesheet.Pictures.Insert(strImagePath)
inserts pictures into a spreadsheet as a linked picture. If I send the spreadsheet out of our network the images fail.
How can I place an image as an embedded image?
I am also calling this method from Access.
Insert a picture in Word, PowerPoint, or Excel Click the location in your document where you want to insert a picture. On the Insert tab, click Pictures. Select the option you want to use for inserting pictures.
Definition: Embedding refers to the integration of links, images, videos, gifs and other content into social media posts or other web media. Embedded content appears as part of a post and supplies a visual element that encourages increased click through and engagement.
It is possible to use the JPEG file format for more than just displaying images, however. File archives can actually be embedded in the JPEG images, providing business users with additional possibilities when it comes to distributing data.
Note that you can set the required Width and Height parameters to -1, which then maintains the height and width of the original image!
Activesheet.Shapes.AddPicture Filename:="C:\image.jpg", LinkToFile:=msoFalse, _
SaveWithDocument:=msoTrue, Left:=0, Top:=0, Width:=-1, Height:=-1
http://excelmatters.com/2013/11/25/default-picture-size-with-shapes-addpicture/
(Added as another answer to increase visibility as I've struggled with this problem for ages and haven't found this solution documented anywhere else.)
you can use the shapes.addpicture method
activesheet.Shapes.AddPicture Filename:="C:\test\desert.jpg", linktofile:=msoFalse, _
savewithdocument:=msoCTrue, Left:=0, Top:=0, Width:=100, Height:=100
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With