automate powerpoint: can't open file 
Author Message
 automate powerpoint: can't open file

hi,

The only desire I have in vb.net ist to open a powerpoint file.

BUt the following code does not work:
  Dim oppt As PowerPoint.Application
         Dim oppt_doc As PowerPoint.Presentation

         Dim slides As String

         slides = "../introduction.ppt"
         oppt = CreateObject("powerpoint.application")
         oppt_doc = oppt.Presentations.Open(slides)
         oppt.Visible = True
         oppt_doc.SlideShowSettings.Run()

during the execution the system tells me:

Eine nicht behandelte Ausnahme des Typs [exception of
type]'System.Runtime.InteropServices.COMException' ist in
presentation.exe aufgetreten [occured].

Zus?tzliche Informationen: Presentations (unknown member) : Invalid
request.  The PowerPoint Frame window does not exist.

I hope you can read it, although it is partly german.

Where is my problem? :-(

alex.



Sat, 14 May 2005 01:07:47 GMT  
 automate powerpoint: can't open file
Hi,

You need to make the powerpoint application visible before open the .ppt
file. You can try the following:
        oppt = CreateObject("powerpoint.application")
        oppt.Visible = True
        oppt_doc = oppt.Presentations.Open(slides)
        oppt_doc.SlideShowSettings.Run()

Regards,
Elan Zhou
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net?  http://www.gotdotnet.com



Sat, 14 May 2005 11:07:08 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. 'Canned' data in VB program

2. Opening Powerpoint File From VB

3. Open Powerpoint file problem

4. Help: VB5 opening powerpoint files

5. Opening bmp files in powerpoint

6. Powerpoint PPS slide Macro fails to open another PPS file

7. Automating PowerPoint from Access

8. Automating Chart Objects in PowerPoint?

9. Automating Excel Charts to Powerpoint

10. Office XP only: Spurious bookmark added to Word document Automating Powerpoint from Word

11. Need to automate opening .pst file

12. automate powerpoint

 

 
Powered by phpBB® Forum Software