我正在使用 VBA 将 Excel 文件中的数据导入 Visio,并且我还需要在 Visio 文件中包含不在我的 Excel 文件中但保存在本地的图像。我需要能够以类似于形状对象的方式操作图像(即;使用 VBA 设置其宽度/高度/位置,例如 Shape.Cells ("width") = X 等)
我在网上广泛寻找解决方案,但无济于事。
最佳答案
您必须定义要插入图片的页面。阅读更多关于 Page.Import Method (Visio)
Set shp = ActivePage.Import("C:\Users\surrogate\Pictures\new.png")
shp.Cells("PinX").Formula = "100 mm"
shp.Cells("PinY").Formula = "150 mm"
关于vba - 使用 VBA 将图像导入 visio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45308600/