0
votes

I want to copy and paste an Excel Range into a PowerPoint slide. The range has conditional formatting, number formats and border formats. Here is what I have:

mwksTables.Range("T_Table").Copy  
mobjPowerPointSlide.Shapes.PasteSpecial 0

This code works but doesn't paste keeping the original formatting. If I change the code to the following:

mobjPowerPointSlide.Shapes.PasteSpecial 2

it prints correctly but magnifies it so as to show only half of the data in the object (weird). It's like it zooms the range after copying but before pasting.

I have tried this:

Application.CommandBars.ExecuteMso ("PasteSourceFormatting")

But this only works for Office 2010.

Can someone help? How can I paste a table into PowerPoint 2016 and make it look identical to the range in Excel 2016? Thanks!

1
I assume the other possible formats - e.g. JPG/bitmap/PNG, see here - have the same "zoom" error?BigBen
@BigBen I've tried every enum and they all either have the zoom problem, or wrong format, or right format but no color format from the conditional formatting in Excel.Brian

1 Answers

0
votes

Try pasting it as an OLE object...

oSlide.Shapes.PasteSpecial 10 'ppPasteOLEObject

Then you will also be able to either edit the worksheet object in PowerPoint or open it in Excel.