2
我希望能够通过单击我的用户窗体中的按钮来更改图像形状的图像。更改图像形状的图像
在互联网上我发现功能UserPicture
,但图像保持不变。
Private Sub ChangeImage_Click()
ActivePresentation.Slides("Slide1").Shapes("SolutionA_Image").Visible = True
ActivePresentation.Slides("Slide1").Shapes("SolutionA_Image").Fill.UserPicture ("D:\User\Desktop\SolutionWrong.jpg")
End Sub
Private Sub HideImage_Click()
ActivePresentation.Slides("Slide1").Shapes("SolutionA_Image").Visible = False
End Sub
当我点击HideImage
按钮,形状变得不可见的,所以我对形状的选择似乎是正确的。
我也试过
ActivePresentation.Slides("Slide1").Shapes("SolutionA_Image").Fill.UserPicture "D:\User\SolutionWrong.jpg"
但这也不
编辑
当然我检查了路径的新形象工作,这是正确的。
我刚测试它,它的工作原理......它是什么样的形状? –
我通过从'insert'菜单中选择'picture'创建它 – Christopher
啊不奇怪:)做到这一点。插入~~>一个无边框的矩形形状,现在试试:) –