Powerpoint Macro : Macro Replaces the manual process of "Select All > Copy > Paste Special > Picture" with a single click.




Macro selects all shapes in current Slide, copy and paste under image format.

Sub CopyPasteAsPicture()

Dim slide As slide

Dim shape As shape

Dim shapeRange As shapeRange

' Get the current slide

Set slide = ActiveWindow.View.slide

' Select all shapes on the slide

slide.Shapes.SelectAll

' Copy selected shapes

Set shapeRange = Application.ActiveWindow.Selection.shapeRange

shapeRange.Copy

' Paste as picture

slide.Shapes.PasteSpecial DataType:=ppPasteEnhancedMetafile

End Sub


Nhận xét