Subject Re: Opening word doc and pdf from dbase
From Bami Onwu <bamionwu@yahoo.com>
Date Tue, 09 Feb 2016 16:54:42 -0500
Newsgroups dbase.getting-started

Hi Ivar,

Thank you but how do I use it to open a folder for me to select the particular file I want.

Thank you.

Bami.




Ivar B. Jessen Wrote:

> On Tue, 09 Feb 2016 08:43:02 -0500 Bami
>  Sender:  Bami <bamionwu@yahoo.com>
>  wrote the following in:
>  Newsgroup: dbase.getting-started
>  Subject: Opening word doc and pdf from dbase:
>  MessageID:<Z76FM$zYRHA.3848@ip-AC1E04A7>
>  References:
>  
> >Hi all,
> >
> >I use the below format to get word docs and pdf into dbase,
> >
> >function GETDOCS_onClick()
> >      doc = getFile("*.doc;*.docx;*.pdf;*.xls;*.xlsx;*.pje;*.xbm", "", false, "")
> >
> >      if len(trim(pic)) > 0
> >         form.nb.staffimg.datasource = "FILENAME " + doc
> >      else
> >         form.nb.staffimg.datasource = null
> >      endif  
> >      return
> >
> >Now, how can I from dbase, open the doc in word or in the case of pdf, open it in acrobat reader.
> >
> >Your help is appreciated in this regard.
> >
> >Bami.
>
>
> Try the code below my signature. Replace <MyProgram.doc> with the real name and
> extension of the program you wish to open.
>
> Does it open the program in the way you wanted?
>
> Ivar B. Jessen
>
> //-----
> #include <WIN32API.H>
> #include winuser.h
> DO :include:WIN32API.PRG  
>
> ShellExecute(_app.framewin.hwnd, "open", "<MyProgram.doc>", null, null, SW_SHOW)
> //-----