Excel to PowerPoint VBA PasteSpecial Keep Source Formatting -
i'm trying copy , paste range excel document powerpoint slide using vba. seems work fine except it's copying range image rather keep source formatting. want keep source formatting when copy , pastes in. help!
opptapp powerpoint.application dim opptfile powerpoint.presentation dim opptshape powerpoint.shape dim opptslide powerpoint.slide on error resume next set xlapp = getobject(, "excel.application") on error goto 0 windows("file1.xlsx").activate sheets("sheet1").select range("b3:n9").select selection.copy opptapp.activewindow.view.gotoslide (2) opptapp.activewindow.panes(2).activate opptapp.activewindow.view.pastespecial datatype:=pppasteoleobject opptapp.activewindow.selection.shaperange.left = 35 opptapp.activewindow.selection.shaperange.top = 150
have tried using
opptapp.activewindow.view.pastespecial datatype:=pppastedefault
Comments
Post a Comment