[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

chjossi@gmx.ch

5/22/2007 1:13:00 PM

Hi

I would like to attach to a running excel application.

What I would like to do is presenting the user a list of excel applications
that are currently visible. The user will specify one of these application
which will be the target for some data that will be exported from my program.

With System.Diagnostices.Process.GetProcessesByName("Excel") I can easily
populate the list. What I can't do is binding my Excel.Application object to
the running application.

System.Runtime.InteropServices.Marshal.GetActiveObject() is no good
System.Runtime.InteropServices.Marshal.BindToMoniker seems to need an
argument like the file path of a currently opened file within the excel
instance.

Is there a way to bind to the application? I have a process object through
this object I can access the process id, the process handle, the main window
handle etc.
1 Answer

J?rgen Ahrens

5/25/2007 11:56:00 AM

0

I have the same problem.

Has somebody an answer for this?

thanks
jahrens