I want to copy I2:J3 to Powerpoint, centre-align it, and set the table's height and width. The Excel cells are formatted as is required, so I would prefer copying the entire thing and paste as Table in PPT (instead of an source-linked image as PasteSpecial would result in). I am using Office 2010
I managed to go as far as using the following to "Keep Source Formatting" I found at another help site
After pasting the table is the actively selected element. However, everything I have tried to format it result in one error or another. I cannot seem to use "Shapes" or "Items" to manipulate the qualities I am trying to. Please advise.
I am fine with whatever code that works, but for those who are interested, most bizarrely, I found the following to be working--kind of. I inserted the MessageBox as part of debugging, and found that the code would only work with the message box exactly as it is. Changing the content of the box, or moving it elsewhere would result in an error; so would (assuming somehow the system needs to Count the shapes) using opening an Integer to hold the result of Count.
I managed to go as far as using the following to "Keep Source Formatting" I found at another help site
Code:
PPApp.CommandBars.ExecuteMso ("PasteSourceFormatting")
After pasting the table is the actively selected element. However, everything I have tried to format it result in one error or another. I cannot seem to use "Shapes" or "Items" to manipulate the qualities I am trying to. Please advise.
I am fine with whatever code that works, but for those who are interested, most bizarrely, I found the following to be working--kind of. I inserted the MessageBox as part of debugging, and found that the code would only work with the message box exactly as it is. Changing the content of the box, or moving it elsewhere would result in an error; so would (assuming somehow the system needs to Count the shapes) using opening an Integer to hold the result of Count.
Code:
With PPPres.Slides(1).ShapesDim i As Integer
For i = 1 To .Count
MsgBox (PPPres.Slides(1).Shapes.Count)
If .Item(i).HasTable Then
.Item(i).Width = 374
.Item(i).Height = 91
End If
Next i
End With