how to open a specific file with button on form

H

Haroon

Hi

I am trying to make a navigation menu using form, where a user clicks a
button to open a file, e.g. if button1 is pressed open fileA.doc, if button2
is pressed, open fileB.doc etc..

these buttons are individual, each file name is associated with each button.

anyone can help?

cheers.
 
G

Graham Mayor

Something like

Private Sub CommandButton1_Click()
Me.Hide
Documents.Open "D:\Path\Filename1.doc"
End Sub

Private Sub CommandButton2_Click()
Me.Hide
Documents.Open "D:\Path\Filename2.doc"
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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