For creating a new presentation use:
[CODE=vb]Sub NewPPT()
Dim Obj1 As Object
Set Obj1 = CreateObject("p owerpoint.appli cation")
Obj1.Presentati ons.Add
Obj1.Visible = True
End Sub[/CODE]
for opening an existing one:
[CODE=vb]Sub OpenPPT()
Dim Obj1 As Object
Set Obj1 = CreateObject("p owerpoint.appli cation")
Obj1.Presentati ons.Open Filename:="C:\p resentation1.pp t"
Obj1.Visible = True
End Sub[/CODE]
When I command to create a new presentation it works.
But when I command to open a presentation it doesn't work.
I had writeen this code:
Private Sub Command1_Click( )
Dim Obj1 As Object
Set Obj1 = CreateObject("p owerpoint.appli cation")
Obj1.Presentati ons.Open FileName:="C:\d vd.pps"
Obj1.Visible = True
End Sub
When I command to create a new presentation it works.
But when I command to open a presentation it doesn't work.
I had writeen this code:
Private Sub Command1_Click( )
Dim Obj1 As Object
Set Obj1 = CreateObject("p owerpoint.appli cation")
Obj1.Presentati ons.Open FileName:="C:\d vd.pps"
Obj1.Visible = True
End Sub
I'd appreciate the help!
Hi... (sorry for the delay)
Sometimes it happens with powerpoint that you have to make the object visible before you open a file, i dont know why is this, but certainly it works most of the times, then why dont you try it out?"
[CODE=vb]Private Sub Command1_Click( )
Dim Obj1 As Object
Set Obj1 = CreateObject("p owerpoint.appli cation")
Obj1.Visible = True
Obj1.Presentati ons.Open FileName:="C:\d vd.pps"
End Sub[/CODE]
Comment