Re: NEWERA -- Starting Word
Posted in 1997
In article <PxRsLDAEnU$zMAOi@excelsis.co.uk>, Mike Ripley <mike.ripley@excelsys.co.uk> wrote: >In article <G7++z0ElJTxM092yn@kcbbs.gen.nz>, Kerry Sainsbury ><kerry@kcbbs.gen.nz> writes >>>> I may be missing something obvious but >>>> how do I start Microsoft Word from a button on a NEWERA window and pass >>>> it a document name. >> >>I wouldn't use "RUN" and hardwire in a path. Use the Win32 API function >>"ShellExecute" (I assume NewEra lets you access the API!): >> >> ShellExecute(Handle, 'open', docname, '', '', sw_ShowNormal) >> >>This means you haven't even hard-wired in MS Word - it'll use whatever >>product has been setup to open ".doc" documents. >> >What I really want to do is to check that "word" is running. If not then >start it up and pass the document name. (This bit works OK). However if >it is running then dont start a new window but simply pass the document >name to the existing program. I suppose dde is the answer? DDE is what we used for this purpose when talking to Excel, although we're supposed to be using OLE/OCX/AtiveX/Whatever-it's-called-today these days. DDE is "obsolete", I think. I found trying to get documentation on this stuff nearly impossible (I'm just lucky that there are lots of friendly Delphi programmers out there who write nice little classes that do this stuff, and then make them freely available!) ------------------------------------,------------------------------------------ Kerry Sainsbury, kerry@kcbbs.gen.nz | THE INFORMIX FAQ v2.10 May 1997 Quanta Systems, Auckland | http://www.iiug.org/techinfo/faq/ New Zealand. Work: +64 9 377-4473 | ftp://ftp.iiug.org/pub/informix/faq Home: +64 9 279-3571 | ftp://kcbbs.gen.nz:/pub/informix/