there's code in here posted 2 weeks back to do the same thing. google for it
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @
www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------
"Adine" <ad********@yahoo.com> wrote in message
news:17******************************@magma.ca...
I tried this too but still it's not working
excelObj =
(Excel.Application)System.Runtime.InteropServices. Marshal.GetActiveObject("E
xcel.Application");
"Adine" <ad********@yahoo.com> wrote in message
news:L_******************************@magma.ca... Hi,
How can I have access to the excel files which are already opened? I
tried this:
excelObj = new Excel.Application();
MessageBox.Show(this, excelObj.Workbooks.Count.ToString());
But it shows always zero, nomatter how many excel files are already
opened. I need to have access to the current opened excel files. How?
Thanks,
Adine