>Is there a means to open and view a specific file from a form without knowing the file's format?
>
>I have been asked to add an ability to view attachment files, but have no way of knowing in advance of knowing whether the file will be .txt, .doc, .xls, or what.
>
>I was hoping to use GETFILE(), but either it isn't up to the job, or I'm not using it correctly.
How about opening it with the default application for the file using shellexecute?
DECLARE INTEGER ShellExecute IN "Shell32.dll" ;
INTEGER hwnd, ;
STRING lpVerb, ;
STRING lpFile, ;
STRING lpParameters, ;
STRING lpDirectory, ;
LONG nShowCmd
shellexecute(0,"OPEN","evantext.txt","","",1)
shellexecute(0,"OPEN","evandoc.doc","","",1)
shellexecute(0,"OPEN","evanexcel.xls","","",1)