开发者

How do I copy a Shape from one Powerpoint presentation to another in VBA?

I have VBA code to copy shapes matching a开发者_开发百科 certain criteria from one Powerpoint presentation to another below. However, when it pastes the shape, it is offset (down and to the right) from the original position. How can I copy a shape while maintaining the original coordinates?

sourceShape.Copy
Presentations(2).Windows(1).Activate
ActivePresentation.Slides(x).Shapes.Paste (1)


Perhaps simply:

Shape s=ActivePresentation.Slides(x).Shapes.Paste (1)

s.Left=sourceShape.Left

s.Top=sourceShape.Top
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜