View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default VBA between excel and powerpoint

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

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Kent" wrote in message
...
Hi - I need some help.

I'm new to VBA.

My problem is that I in Excel need to make a picture copy of a diagram and
then post it in a new slide in a open powerpoint presentation.

But how do i write code in a Excel makro to work in Powerpoint?

Br Kent