 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Prabhat Guest
|
Posted: Fri Aug 26, 2005 3:03 pm Post subject: How get Reference to Running Excel Application |
|
|
Hi All,
How can i write a code in delphi that will do the below task:
1) How Do I check If Excel is running or not?
2) If Not running then I will open a New Excel Application with a Excel
Document.
3) If Running, Then which document is open (or) if the document test.xls is
open or not.
Please help me to get the sample code.
Thanks
Prabhat
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Fri Aug 26, 2005 8:12 pm Post subject: Re: How get Reference to Running Excel Application |
|
|
try
xls := GetActiveOleObject('Excel.Application');
except
xls := CreateOleObject('Excel.Application');
end;
To check if document active, you must iterate the xls.Wordkbooks collection
--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com
"Prabhat" <not_a_mail (AT) hotmail (DOT) com> wrote
| Quote: | Hi All,
How can i write a code in delphi that will do the below task:
1) How Do I check If Excel is running or not?
2) If Not running then I will open a New Excel Application with a Excel
Document.
3) If Running, Then which document is open (or) if the document test.xls
is
open or not.
Please help me to get the sample code.
Thanks
Prabhat
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|