Paradox Community

Items in comp.databases.paradox

Subject:Re: adobe reader from pdox button
Date:Thu, 4 May 2017 16:20:57 +0200
From:"F.Huijsmans" <floris@metroprop.nl>
Newsgroups:comp.databases.paradox
In article <4d273d31@pnews.thedbcommunity.com>, mattueen@yahoo.com 
says...
> 
> hi -
> 
> in one of the fields of my paradox db i have pdf files stored.
> 
> so, i'd like to open the adobe reader from a button on the form,
> but i can not figure out the correct command to open the adobe reader.
> 
> something like --
> 
> execute("adobe.exe") ??
> 
> we have adobe reader 8.0, 9.0 and 10.0 
> 
> thanks,
> matt

A late answer but anyway I hope it answers your question!
I simply let the explorer decide what to do with the file. If the file 
extension is recognised the document will be opened by the registered 
program.

;-----------------------------------------------------------------------
------------------
;simply throw a document to the explorer and let the explorer decide 
what to do with it
method OpenDocument(sDocFile String)
var
	sExeCommand String ;command to execute
endVar

;add " (double quote) to start and end of DocFile name to allow for 
spaces in filename
sExeCommand = "Explorer \"" + sDocFile + "\""
;sExeCommand.view()

;execute(command,wait): wait = True -> wait for explorer to close to 
avoid annoying issues
;when opening for instance multiple instances of Excel using the same 
personal.xls

;Errortraponwarnings(yes)
try
	execute(sExeCommand, True)
onFail
	errorShow()
endTry
;Errortraponwarnings(no)

endMethod


Copyright © 2004 thedbcommunity.com