Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Want user to select PDF file
Message
 
To
10/03/2005 14:22:35
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00994570
Message ID:
00994576
Views:
18
>I have PDF files with a unique id as the filename (ie, "2000-999" located on a specific drive on the network. I would like to add a command button to a form which would access a specific PDF file based on the id current displayed on a form. I know the location and the name of the file I would like to select. I would like to be able to open this file.
>
>I'm not sure how to accomplish this. Any direction would be very much appreciated.
>
>TIA,
>
>Sue Burnham

Sue,

If you're just wanting to open the PDFs for viewing with the OSs default viewer (most likely to be Adobe), then just use ShellExecute. You can use either the Windows API ShellExecute function or this way is simpler:
lcFileName = 'PDFFile.PDF'
ox = NEWOBJECT('Shell.Application')
ox.Open(lcFileName)
HTH,
Chad
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Reply
Map
View

Click here to load this message in the networking platform