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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open .pdf file in VFP 7 through label click event 1

Status
Not open for further replies.

CMcC

Programmer
Feb 5, 2002
196
US
Hello all.
Having some difficulties opening a .pdf file on a label click event on a form.
Not really sure what the exact syntax is for adobe, like opening a Microsoft word document for example:
Code:
PUBLIC oword
oword = CREATEOBJECT("Word.application")
oword.documents.open("m:\occ\btr.doc")
oword.visible = .t.
I was trying the pdf because I couldnt find out how to open the word document readonly so that the users couldnt alter the document when viewing.
I tried Ramani's solution 'gsPDF' but this just prompts user to select a file or exit. The users dont know the file name so I want to select the file programatically then just 'show' the users the file - then they can close after viewing.
Any suggestions??
All responses are appreciated![wiggle]
 
Try this:

*****Label.Click()
oShell = Createobject("wscript.Shell")
Application.OLERequestPendingTimeout = 0
cFileName = <<your file name with path>>
oShell.Run(cFileName, 1)
 
Hello Imaginecorp!
Thanks! that did it!
Have a great day.
Angie [2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top