Copy more excel shapes into powerpoint -
i have following code let me copy
sub pptcopy() dim pptapp powerpoint.application dim ppt powerpoint.presentation dim slide powerpoint.slide dim shape1 powerpoint.shape var2 = "c:\documents , settings\aa471714\desktop\presentation2.pot" set pptapp = createobject("powerpoint.application") set ppt = pptapp.presentations.open(var2) set slide = ppt.slides(2) set shape1 = slide.shapes.paste(1) pptapp.visible = true call copyexcel1 shape1 .left = 100 .width = 100 end end sub
and macro
sub copyexcel1() dim oexcel excel.application dim owb workbook dim cht excel.chartobject var2 = "c:\documents , settings\aa471714\desktop\template.xls" set oexcel = new excel.application set owb = oexcel.workbooks.open(var2) oexcel.visible = true sheets("sheet5").chartobjects("achmeabanknl").chart.chartarea.copy end sub
i have 2 issues:
- i want move excel picture specific place in powerpoint (fe shape 3)
- i want copy more excel figure (i need copy 2, 1 shape 3 , 1 shape 4).
does know how should edit code below accomplish this?
dear regards,
marc
first, should edit subject of question; doesn't seem have question itself.
to move shape specific position in "stacking" order, use function:
function shapetozorder(osh shape, lposition long) osh.zorder msosendtoback until osh.zorderposition = lposition osh.zorder msobringforward loop end function
Comments
Post a Comment