Saturday, 29 August 2015

How to Copy Excel Range to PowerPoint Slide with Source Formatting as Editable Table

Excel VBA Macro to Copy Excel Range to PowerPoint Slide with Source Formatting as Editable Table

If we want to copy the Excel Range as a Editable Table Format to Power Point Slide , we need to use the " CommandBars.ExecuteMso ("PasteSourceFormatting") " method.

Sample Code :

Dim New_PPT As PowerPoint.Presentation
Dim PPT_Slide As PowerPoint.Slide

Set New_PowerPoint = New PowerPoint.Application
New_PowerPoint.Visible = msoCTrue 
    
New_PowerPoint.ActiveWindow.View.GotoSlide (PPT_No)

Set PPT_Slide = New_PowerPoint.ActivePresentation.Slides(PPT_No)

             MyRange.Copy
             New_PowerPoint.Activate
             PPT_Slide.Select
PPT_Slide.Application.CommandBars.ExecuteMso ("PasteSourceFormatting")


Thanks ,
TAMATAM

No comments:

Post a Comment

Follow Me by Email

ExcelKingdom-Popular Posts

ExcelKingdom-Random Posts