Opening MS Office Apps from within Access

  • Thread starter Thread starter Stewart
  • Start date Start date
S

Stewart

Guest
I frequently use the following code behind buttons on my forms, so that users can open documents from within Access:

dim stAppName as string

stAppName = "POWERPOINT.exe H:\NewSuspense_Guide.ppt"

Call Shell(stAppName, 1)

Here is my question:

Is there a way I can make this work, even if the document name, or the directory name contains spaces?

Thanks,

Lynn Stewart
 
Normally you can open any Office-Document much more comfortable by using this:

Dim oPPT as Object
set oPPT=createObject("Powerpoint.Application")

Then you can control all Powerpoint-funcs from within VBA.

Hope you can understand and use this.
 

Users who are viewing this thread

Back
Top Bottom