Oh dear.
So I have to kill Excel immediately after?


On Thu, Oct 2, 2014 at 10:07 AM, Richard Kaye <[email protected]> wrote:

> You're welcome, Sytze. Keep in mind that after the Excel object is created
> you will have a running instance of Excel but it won't be visible by
> default. You need to keep track of it or you can end up with a bunch of
> invisible instances of Excel.
>
> --
>
> rk
> -----Original Message-----
> From: ProfoxTech [mailto:[email protected]] On Behalf Of Sytze
> de Boer
> Sent: Wednesday, October 01, 2014 5:00 PM
> To: [email protected]
> Subject: Re: Is Excel installed?
>
> RK, many thanks
>
>
>
> On Thu, Oct 2, 2014 at 8:58 AM, Richard Kaye <[email protected]> wrote:
>
> > Use NEWOBJECT to attempt to create an instance of Excel. If you get an
> > object then Excel is installed. Wrap the whole thing in a TRY...CATCH.
> >
> > Untested pseudo-code to get you started
> >
> > LOCAL m.loExcel AS Excel.Application
> > TRY
> >         m.loExcel=NEWOBJECT([Excel.Application])
> > CATCH TO m.loError
> > * do something here if you want depending on the error FINALLY
> >         IF VARTYPE(m.loExcel)<>[O]
> >                 MESSAGEBOX([No Excel here!])
> >         ELSE
> >                 MESSAGEBOX([We have Excel here!])
> >                 m.loExcel.Visible=.t.
> >         ENDIF
> > ENDTRY
> >
> >
> > --
> >
> > rk
> > -----Original Message-----
> > From: ProfoxTech [mailto:[email protected]] On Behalf Of
> Sytze
> > de Boer
> > Sent: Wednesday, October 01, 2014 3:48 PM
> > To: [email protected]
> > Subject: Is Excel installed?
> >
> > What is the quick way to determine of Excel is installed?
> >
> > In my system, as an example, clients can turn a number of reports into an
> > Excel pivot report.
> > Of course, a number of them phone me to say there's a bug in the system
> > because my system comes up with an OLE error. Excel is not installed
> >
> > --
> > Kind regards,
> > Sytze de Boer
> >
> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAG1nNy_GOW76E0sBuAzRqpM1yk=91f+3ejksvo8qyov+0fe...@mail.gmail.com
** 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.

Reply via email to