Powerpoint Automation: WebOptions

C

Chris Smith

Hi,

I have an application that interacts with PowerPoint via COM to export
PowerPoint slides as HTML. I get a Presentation object by opening the
file, and look for a WebOptions property of that object. Most of the
time, that works; but for a few computers here and there, it seems to
fail. All of the failing systems belong to customers of ours, so I
haven't been able to investigate closely; but there seems to be no
common thread in terms of the version of PowerPoint in use.

Any ideas? When would WebOptions not exist?
 
S

Steve Rindsberg

Hi,

I have an application that interacts with PowerPoint via COM to export
PowerPoint slides as HTML. I get a Presentation object by opening the
file, and look for a WebOptions property of that object. Most of the
time, that works; but for a few computers here and there, it seems to
fail. All of the failing systems belong to customers of ours, so I
haven't been able to investigate closely; but there seems to be no
common thread in terms of the version of PowerPoint in use.

Any ideas? When would WebOptions not exist?

If they're using PPT 97, there'd be no WebOptions object.
 
C

Chris Smith

Steve Rindsberg said:
If they're using PPT 97, there'd be no WebOptions object.

Okay, but they are mostly using PowerPoint 2003. When would this
property not exist with PowerPoint 2003? Or is it possible that someone
has two versions of PowerPoint installed and when I get
"PowerPoint.Application" it's coming back with the wrong one?
 
S

Steve Rindsberg

Okay, but they are mostly using PowerPoint 2003. When would this
property not exist with PowerPoint 2003? Or is it possible that someone
has two versions of PowerPoint installed and when I get
"PowerPoint.Application" it's coming back with the wrong one?

I don't *think* that the ability to save as Web Page (and hence the WebOptions
object) was an optional install item, but you might want to re-run Setup on
your copy of Office 2003, choose Custom install and see whether that option can
be disabled.

And it's always possible that you'd get an older version of PPT if several are
installed. That's easy enough to check. Once you have a reference to the
application object, test its .Version property.

Because .Version returns a string and because in one or two versions, the
string is something like 8.01b, you want to exercise a bit of caution:

If Int(Val(.Version)) > 8 Then
' Safe
Else
MsgBox "Ah, oldies but goldies ... sorry, can't do web stuff with you."
End If
 

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