How to insert an embedded picture?

后端 未结 3 1622
忘了有多久
忘了有多久 2020-11-27 21:15

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

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-27 21:43

    Activesheet.Shapes.AddPicture Filename:="C:\image.jpg", LinkToFile:=msoFalse, _
            SaveWithDocument:=msoTrue, Left:=0, Top:=0, Width:=-1, Height:=-1
    

    this works, maybe the following code can help someone too (it helped me) this is how you select the image you've just added:

    ActiveSheet.Shapes(ActiveSheet.Shapes.Count).Select
    

提交回复
热议问题