VBA插入嵌入式图片的excel [英] VBA to insert embeded picture excel

查看:394
本文介绍了VBA插入嵌入式图片的excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到了很多关于我们的帖子 xlApp.activesheet.Pictures.Insert(strImagePath)的插入图片变成为preadsheet使用VBA,它的伟大工程。唯一的问题是它插入它作为链接的图片。所以,如果我发s preadsheet我们的网络图像失败。谁能告诉我如何使用 Pictures.Insert 的图像将作为嵌入图像,或者将其放置嵌入另一种方法?我也呼吁从进入这个方法有没有什么帮助的。

I have seen lots of posts about us xlApp.activesheet.Pictures.Insert(strImagePath) to insert pictures into a spreadsheet with VBA, which works great. The only problem is it inserts it as a linked picture. So if I send the spreadsheet out of our network the images fail. Can anyone tell me how to use Pictures.Insert to place the image as an embedded image, or maybe another method that will place it embedded? I am also calling this method from access if that helps at all.

推荐答案

您可以使用shapes.addpicture方法

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

这篇关于VBA插入嵌入式图片的excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆