Trying to open a powerpoint presentation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
Back
Top