Senin, 19 September 2011

[MS_AccessPros] Calling WordPad from Access and file not found

 

Great Day, I have created a help file that opens MS WordPad and then I expect the code to open the help file. I use the following code:

Private Sub btnHelp_Click()

On Error GoTo Err_btnHelp_Click

Dim RetVal As Long
RetVal = Shell("C:\Program Files\Windows NT\Accessories\Wordpad.exe " & "C:\Users\David\My Documents\Independent Auto - Help - Repair Order.rtf", 1)

Exit_btnHelp_Click:
Exit Sub

Err_btnHelp_Click:
MsgBox Err.Description
Resume Exit_btnHelp_Click

End Sub

I receive the WordPad error:

C:\Users\David\My
Cannot fine this file
Please verify that the correct path and file name are given.

I have checked the path in the code and to the best of understanding, it appears to be correct. When I open WordPad from the Microsoft Start button, I can open the file.

Thanks in advance for the assistance.

r/David

__._,_.___
Recent Activity:
MARKETPLACE
A bad score is 596. A good idea is checking yours at freecreditscore.com.

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar