word doc

N

nathan

I am trying to open a word document from one of my forms.
The code I am using is:
Private Sub Command14_Click()
On Error GoTo Err_Command14_Click

Dim stAppName As String

stAppName = "Word.exe F:\5.DESIGN_DEPT\Policy
Guidance\Trade Preambles.doc"
Call Shell(stAppName, 1)

Exit_Command14_Click:
Exit Sub

Err_Command14_Click:
MsgBox Err.Description
Resume Exit_Command14_Click

End Sub

I used the command button wizard to do this and added the
Word.exe myself. I have done this for excel and it has
worked. However with this one I keep getting the
error 'File not Found'
 
A

Albert D. Kallal

Try:

stAppName = "F:\5.DESIGN_DEPT\Policy Guidance\Trade Preambles.doc"

Application.FollowHyperlink stAppName
 

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