HighTechTalks DotNet Forums  

attach to excel process

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss attach to excel process in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
chjossi@gmx.ch
 
Posts: n/a

Default attach to excel process - 05-22-2007 , 09:13 AM






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("Ex cel") 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.GetActiveOb ject() is no good
System.Runtime.InteropServices.Marshal.BindToMonik er 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.

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.