Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I open a document from a command button
Message
From
12/08/1999 18:16:15
 
 
To
12/08/1999 15:14:53
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00253161
Message ID:
00253255
Views:
11
>I have a data field in my table that is the path and name of a document. I would like to pop open a Word or WordPerfect viewer (depends) with the click of a command button. My data field looks like "H:\dirX\document1.wpd or H:\dirx\document2.doc". Would it be easier to use a viewer from with VFP6 or the app itself?
>
>Can someone point me in the right direction? Thanks in advance!

Easiest way to do this is just open the document using ShellExecute. If you have VFP 6, you can use the Shellexecute class in the FFC. If not, there are a couple of classes here available for download.

Shellexecute is a Windows API call that opens a file with it's associated application.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform