Paste a chart from Excel to a specific placeholder in a specific layout. Powepoint 2010

十年热恋 提交于 2019-12-03 20:25:12

If I understood your problem then I think this is what you want.

You are currently pasting the chart "On" Slide 1. You have to paste it "In" relevant Place Holder in Slide 1.

Amend your code to incorporate this (TRIED AND TESTED)

Dim nPlcHolder As Long

With PPPres
    nPlcHolder = 2 '<~~ The place holder where you have to paste

    .Slides(1).Shapes.Placeholders(nPlcHolder).Select msoTrue
    .Windows(1).View.PasteSpecial (ppPasteMetafilePicture)
End With

Now even if you change your layout, the charts will move accordingly.

SNAPSHOT

HTH
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!