VBS file fails to create PowerPoint object with fresh office 2007install, works when 2003 installed

M

micah.white

Hello -

I have the following vbs test script which creates a PowerPoint object
and exports jpgs - this does not work with a fresh Office 2007 install
- I get a general 80004005 error. However, once I install Office 2003
on the computer the vbs file works fine. Even after I unistall Office
2003 it works fine. So what is the problem ??

Thanks in advance
Deli


Option Explicit
REM We use "Option Explicit" to help us check for coding mistakes

Dim AppPPT
Dim oPres
Dim I

Set AppPPT = CreateObject("PowerPoint.Application")
Set oPres = AppPPT.Presentations.Open("c:\temp.ppt", , , False)
oPres.Export "c:\zzz","JPG",2048,1546
oPres.Close
Set oPres = Nothing
AppPPT.Quit
Set AppPPT = Nothing
 
M

micah.white

Hello -- yes I was aware of the flaky image export problems with PPT
2007 SP1 -- whole other can of worms :)

It seems like the VB Script cannot create the PPT object via late
binding COM --

CreateObject("PowerPoint.Application")

Say, if I commented out the Export code command, the VB Script would
still fail with script host error 80004005. I know this usually boils
down to some sort of file permission error.

I have tried some script with Word 2007 and it executes ok - I can
create a hidden instance of Word etc and call commands using it's dom.

It's PowerPoint that seems to be the problem.

Update - I tried uninstalling PowerPoint 2003 and my scripts
immediately started failing with an "unspecified error" 80004005. So
there's something in the 2003 install that lets VB script create
PowerPoint objects but will fail with only Office 2007 on the
system ??

Anyone can help?
Deli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top