Philip Borkholder wrote:
> Thanks Allen,
> i looked on their site however it seems to have tools for only printing
> to a PDF Driver.
Is this any use? (Just pass in the filename and it'll open it if the
app is there)
-----------------------------------------------
PROCEDURE RunOtherApp(tcFileName)
LOCAL oErr, cSuffix, cString
DECLARE INTEGER ShellExecute IN Shell32.DLL ;
LONG HWND, ;
STRING lpOperation, ;
STRING lpFile, ;
STRING lpParameters, ;
STRING lpDirectory, ;
INTEGER nShowCmd
TRY
ShellExecute(0,"open",tcFilename,"","",5)
CATCH TO oErr
cSuffix = UPPER(JUSTEXT(tcFileName))
DO CASE
CASE cSuffix = 'DOC'
cString = 'Check that MS Word is properly installed on
this PC.'
CASE cSuffix = 'XLS'
cString = 'Check that MS Excel is properly installed on
this PC.'
CASE cSuffix = 'MSG'
cString = 'This is an Outlook message file. Check that
MS Outlook is
properly installed on this PC.'
CASE cSuffix = 'PPT'
cString = 'Check that MS Powerpoint is properly
installed on this PC.'
CASE INLIST(cSuffix, 'JPG','BMP','TIF','TIFF','GIF','PNG')
cString = 'Check that you have a graphics program
capable of opening
the file properly installed on this PC.'
CASE cSuffix = 'PDF'
cString = 'Check that Adobe Acrobat Reader is properly
installed on
this PC.'
CASE INLIST(cSuffix, 'DWG','DXF')
cString = 'Check that AutoCAD or an AutoCAD viewer is
properly
installed on this PC.'
CASE LEFT(cSuffix, 1) = 'V'
cString = 'This is probably a Visio file. Check that
Visio is
properly installed on this PC.'
CASE cSuffix = 'RTF'
cString = 'Check that MS Word or another Word Processor
is properly
installed on this PC.'
CASE LEFT(cSuffix, 3) = 'HTM'
cString = 'This is an HTML document. Check that you
have a program
on this PC which can open it and that is properly installed.'
CASE INLIST(cSuffix, 'CHM', 'HLP')
cString = 'This is probably a Windows help File. Check
that you have
a program on this PC which can open it and that is properly installed.'
OTHERWISE
cString = "Check that you have a program on this PC
which can open it
and that is properly installed."
ENDCASE
MESSAGEBOX(tcFileName + " could not be opened." ;
+ CRLF + CRLF + cString, ;
MB_OK + MB_DEFBUTTON1 + MB_ICONEXCLAMATION, ;
APPNAME_LOC)
ENDTRY
RETURN
ENDPROC &&* RunOtherApp(tcFileName)
---------------------------------------------
--
Cheers
============
Brian Abbott
============
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.