Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Jose F Zouain" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Open a PDF Document from VO Application Date: 13 Sep 2014 16:35:28 GMT Lines: 46 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: individual.net WS6QQ7dtCB+Hu4eD5Fzl7A/M5nnig5Fuz0xlzxEaHrZOCBJK2A Cancel-Lock: sha1:8ljk4eV7yhO3Ut+p997OhiOZwUM= User-Agent: XanaNews/1.18.1.5 Xref: csiph.com comp.lang.clipper.visual-objects:7204 JohnMartens wrote: > This works for me for any file that has an app that can open it > > nErr := > ShellExecute(MyShellWindow():Handle(),PSZ("open"),PSZ(_CHR(34)+cFileNm > +_CHR(34)),PSZ(""),PSZ(""),SW_SHOWNORMAL) IF INT(@nErr) > 32 // OK > ELSE > // No app to open this type of file > ENDIF > > In the same wya you can print it like this (do not know anymore why I > use the _CHR(34) in open and not in print) nFout := > ShellExecute(MyShellWindow():Handle(),PSZ("print"),PSZ(cFileNm),PSZ("" > ),PSZ(""),SW_SHOWNORMAL) > > After printing you must close adobe like this > > DO WHILE (hWnd := FindWindow(NULL_PSZ, PSZ("Adobe Reader"))) = > NULL_PTR Sleep(500) > ENDDO > Sleep(5000) > // Close > PostMessage(hWnd, WM_CLOSE, 0, 0) > > > Jose F Zouain schreef op 5-9-2014 om 19:51: > > > > Hi Guys > > > > Happy New Year to all > > > > Is there some piece of code you guys can share, I woul like to open > > a PDF Document from a Data Window, I already have the way insert it > > into an SLE, what I need is the command to call any PDF reader, > > like Acrobat and display the document on the screen. > > > > Best regards > > > > Jose Zouain > > Thanks for the reply. --