3
我有一个Powerpoint 2010宏以将特定图片插入到活动幻灯片上的固定位置。通过VBA(Powerpoint)添加的图片获取插入到占位符
Dim oSlide As Slide
Dim oPicture As Shape
' Set oSlide to the active slide.
Set oSlide = Application.ActiveWindow.View.Slide
' Insert Image to Footer
Set oPicture = oSlide.Shapes.AddPicture("PathToFile.png", _
msoFalse, msoTrue, 630, 390, 15, 15)
' Move the picture to the center of the slide. Select it.
With ActivePresentation.PageSetup
oPicture.Select
oPicture.Name = "Dokumentverknüpfung"
End With
如果幻灯片上没有未使用的占位符,此代码可以正常工作。 如果有一个占位符,图片将自动插入此占位符。
有没有办法告诉脚本避免占位符,只接受给定的坐标?
谢谢 延
哇,感谢您的快速回复! 这样做了,现在宏应该像它应该:-) – Schmoozer
不客气的Jens。很高兴帮助和高兴它为你工作。 –