All,
I have a button on a form which, when clicked, I want to open a PowerPoint document for the user to view.
The code I have is :
Private Sub Command45_Click()
Dim stAppName As String, stFile As String
Dim strQ As String
strQ = Chr$(34)
'Set the location of your executable
stAppName = strQ & "C:\Program Files\Microsoft Office\Office10\powerpnt.exe " & strQ
'Set the location of your target file
stFile = strQ & "Z:\Houfile047\ESG\Procurement\LensProj\ProLog Implementation Project\Procurement\Strategic Sourcing\Savings Tracking\Calculators and Plug n Plays\Price Scales" & strQ
Call Shell(stAppName & " " & stFile, 1)
End Sub
When I run this I get a message that "PowerPoint was unable to open or save this document. Please ensure that you have access priviliges to read or write the document and that it is not encrypted"
I should have the required priviliges as I am able to navigate to and open the PPT fine if I use something like explorer.
Any got ideas as to what the problem may be ?
TIA
I have a button on a form which, when clicked, I want to open a PowerPoint document for the user to view.
The code I have is :
Private Sub Command45_Click()
Dim stAppName As String, stFile As String
Dim strQ As String
strQ = Chr$(34)
'Set the location of your executable
stAppName = strQ & "C:\Program Files\Microsoft Office\Office10\powerpnt.exe " & strQ
'Set the location of your target file
stFile = strQ & "Z:\Houfile047\ESG\Procurement\LensProj\ProLog Implementation Project\Procurement\Strategic Sourcing\Savings Tracking\Calculators and Plug n Plays\Price Scales" & strQ
Call Shell(stAppName & " " & stFile, 1)
End Sub
When I run this I get a message that "PowerPoint was unable to open or save this document. Please ensure that you have access priviliges to read or write the document and that it is not encrypted"
I should have the required priviliges as I am able to navigate to and open the PPT fine if I use something like explorer.
Any got ideas as to what the problem may be ?
TIA