Trying to open a powerpoint presentation

J

jokobe

I'm trying to open an powerpoint presentation with this code:
Set PowerpointApp = GetObject("& strDocName &")
pr.SlideShowSettings.Run
the strdocname holds the filename and the value is set a few lines before.
But the PowerpointApp is always "nothing" and no file is opening.

Any helpful hint?

jokobe
 
D

Douglas J. Steele

Try:

Set PowerpointApp = GetObject("""" & strDocName & """")

or

Set PowerpointApp = GetObject(Chr$(34) & strDocName & Chr$(34))

What you've got is telling Access to open a presentation named, literally,
"& strDocName &", which isn't what you want.
 

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