Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening a specific file with GETFILE()
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00567270
Message ID:
00567300
Views:
14
>GETFILE() is a good start, but it only allows you to choose a
>file. If you want to do this the quick way, just let your users
>select a file with getfile(), then use the shellexecute API to
>display it, and let windows decide how to what sort of file it
>is.
>
>This is the syntax:
>
>cFile = GETFILE()declare integer ShellExecute in SHELL32.dll integer
> nWinHandle,string
>cOperation,string cFileName,string cParameters,string
>cDirectory,integer nShowWindow
>if !EMPTY(cFile) AND FILE(cFile)
> ShellExecute(0,"OPEN",cFile,'',sys(2023),1)
>endif

>I hope this is what you were looking for.
>Bill Mittenzwey

Well, the program will "know" the filename (it will be contained in a field), but the user won't -- he'll just hit a button marked "View Attachment" and the program has to open a specific file for him.

This is a task request module: clients write up a task request and attach files if they feel it necessary, and support has to read the file to decide whether to accept the task.

If the task is asssigned them through other means (their supervisor making the assignment), the file is automatically attached to their email. I'd just like them to be able to preview the attachment if necessary.

I might use ShellExecute, but I'm unfamiliar with its workings. Bill's suggestion might work without the step of GETFILE(), since I already know the file's name and location (I just can't control what KIND of file it will be).
Previous
Reply
Map
View

Click here to load this message in the networking platform