Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command Button to open pdf document

Status
Not open for further replies.

Binnit

Technical User
Apr 28, 2004
627
US
Word 97 Template form

I have created a form which will open using the "New" event.

On the form I would like to add a command button that will open a pdf document (user help notes), the pdf is located in the same directory as the template.

Sofar, all I have been able to do is create a hyperlink in the main document but this is not what I want.

Any help appreciated

Happiness is...not getting what you want but wanting what you have already got
 
You could use Shell.
Code:
Private Sub CommandButton1_Click()
Shell ("C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe " & _
   "c:\EFTmanual.pdf")
End Sub
Adjust accordingly. Use the correct path to the executable, and the filename to open could just as easily be a string.

faq219-2884

Gerry
My paintings and sculpture
 
fumei
Thanks, will give it a try.

Happiness is...not getting what you want but wanting what you have already got
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top