Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open existing PowerPoint from Excel with VBA

Status
Not open for further replies.

chilly442

Technical User
Jun 25, 2008
151
US
I have a user form on an active workbook in excel that has a couple charts on it. When the user clicks a button, I want to open an existing PP and copy the charts, one to each slide. I need to start with slide 2. I can get PowerPoint to open, but it will not activate the slides. It does not open the file that I have specified.

Here is what I have so far.
Any help would be greatly appreciated.

Private Sub cmdAdd_Click()
Set Power = CreateObject("PowerPoint.Application")
Power.Visible = True
Power.Application.Open ("C:\Documents and Settings\smbrown\Desktop\test\test.ppt")

End Sub
 
Got the Open PowerPoint to work, now I need to copy the charts into PP.
Any suggestions???

Here is the new code that I have:

Private Sub cmdAdd_Click()
Dim strFile As String
Dim Power As Object
strFile = "C:\Documents and Settings\chilly442\Desktop\test\test.ppt"
Set Power = GetObject(strFile)
Power.Application.Visible = True
End Sub

Thanks in advance for any help!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top