PowerPoint VBA - Code works in debug mode but fails to run in compile mode -
hello code woks on debug mode fails run in complie mode @ commandbars.executemso
suggestions or appreciated.
sub copypasteasunion() dim sld slide dim shp shape dim shapeone string dim shapetwo string dim oshpr shaperange each sld in activepresentation.slides activewindow.view.gotoslide sld.slideindex each shp in sld.shapes if shp.hastextframe = true if shp.textframe.hastext = true shapeone = shp.name shapetwo = shp.name & "_1" shp.duplicate .left = shp.left .top = shp.top .name = shapetwo end set oshpr = sld.shapes.range(array(shapeone, shapetwo)) oshpr.select commandbars.executemso ("shapesunion") end if end if next next end sub
powerpoint version i'm using : powerpoint 2016 (system : windows 7).
error while compiling:
run-time error '-2147467259(80004005)': method 'executemso' of objects '_commandbars' failed
Comments
Post a Comment