VBA between excel and powerpoint
Hi,
I used your routine and it works very well.
I made a change: I don't paste a chart but a range ex: A1:AZ90 but I
have a problem.
It pastes not the whole selection range but only a little part of it.
How can I paste the whole selection?
Thanks a lots
Denis
Bob Phillips ha scritto:
Here is a simple example that paste the activechart in
Sub CreatePowerPoint()
Dim oPPApp As Object
Dim oPPPres As Object
Dim oPPSlide As Object
Set oPPApp = CreateObject("Powerpoint.Application")
Set oPPPres = oPPApp.Presentations.Add
oPPApp.Visible = True
oPPApp.ActiveWindow.ViewType = 1 'ppViewSlide
Set oPPSlide = oPPPres.Slides.Add(1, 11) 'ppLayoutTitleOnly
ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
oPPSlide.Shapes.Paste.Select
oPPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignCenters, True
oPPApp.ActiveWindow.Selection.ShapeRange.Align msoAlignMiddles, True
End Sub
|