Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default open powerpoint file

I want to open a power point file with the following code but it's always
giving me an error on the last line. Somebody knows?

Sub openppt()

Dim Brocoli As Object
Dim Potato As Object
Dim carot As String

carot = "C:\random folder\open me.ppt"

Set Brocoli = CreateObject("powerpoint.Application")
Brocoli.Visible = True

Set Potato = Brocoli.documents.Open(Filename:=carot)

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default open powerpoint file

What error message do you receive?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"raph_baril" wrote in
message
...
I want to open a power point file with the following code but
it's always
giving me an error on the last line. Somebody knows?

Sub openppt()

Dim Brocoli As Object
Dim Potato As Object
Dim carot As String

carot = "C:\random folder\open me.ppt"

Set Brocoli = CreateObject("powerpoint.Application")
Brocoli.Visible = True

Set Potato = Brocoli.documents.Open(Filename:=carot)

End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default open powerpoint file

The PowerPoint object model doesn't have a Documents object. Did
you just make it up? Try

Set Potato = Brocoli.Presentations.Open(filename:=carot)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"raph_baril" wrote in
message
...
I want to open a power point file with the following code but
it's always
giving me an error on the last line. Somebody knows?

Sub openppt()

Dim Brocoli As Object
Dim Potato As Object
Dim carot As String

carot = "C:\random folder\open me.ppt"

Set Brocoli = CreateObject("powerpoint.Application")
Brocoli.Visible = True

Set Potato = Brocoli.documents.Open(Filename:=carot)

End Sub



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default open powerpoint file

Yes I made it up, it works perfectly when you replace "document" by
"presentations"
Thanks!!!

"Chip Pearson" wrote:

The PowerPoint object model doesn't have a Documents object. Did
you just make it up? Try

Set Potato = Brocoli.Presentations.Open(filename:=carot)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"raph_baril" wrote in
message
...
I want to open a power point file with the following code but
it's always
giving me an error on the last line. Somebody knows?

Sub openppt()

Dim Brocoli As Object
Dim Potato As Object
Dim carot As String

carot = "C:\random folder\open me.ppt"

Set Brocoli = CreateObject("powerpoint.Application")
Brocoli.Visible = True

Set Potato = Brocoli.documents.Open(Filename:=carot)

End Sub




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't open PowerPoint files Carl Goodin Excel Discussion (Misc queries) 2 December 14th 07 08:40 PM
How do I stop automatic virus scan when I open powerpoint file? EdV Excel Discussion (Misc queries) 1 June 27th 06 06:57 PM
How to open Excel file from PowerPoint? Bob H[_3_] Excel Programming 4 July 17th 05 01:44 AM
How can I open an xls file in office powerpoint? kuppycake Excel Discussion (Misc queries) 5 February 4th 05 12:01 AM
i received a file that reads powerpoint document file file exten. CCAROLACEREC Excel Discussion (Misc queries) 1 December 4th 04 05:02 PM


All times are GMT +1. The time now is 03:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"