Excel not shutting down properly

S

Stephen

I have an office addin which runs for Word, Excel and Powerpoint. The
problem I am finding is that when I run Excel and then quit, the Excel UI
closes but EXCEL.EXE remains in the task list. This does not happen when
using Word or Powerpoint.

I checked that my addin has finished, including the worker thread which I
have running, and so don't see why it should still be running. I thought it
might be something to do with a object hanging around somewhere so I set all
object back to null and forced garbage collection but still no joy.

Could someone help please.

Stephen
 
S

Stephen

I've traced this problem down to the fact I'm accessing (Excel)
application.Workbooks on a separate thread. The same calls work fine if made
from the main thread.

Is this not allow or is there something else I need to dispose of after
making this call?

Stephen
 
S

Stephen

thanks, now use System.Runtime.InteropService.Marshal.ReleaseComObject,
works a treat!

Cheers,
Stephen
 
M

Mike Cooper

I get this situation when using a web service inside
a .NET add-in in Excel ..


Do you think it is the same issue ? Holding on to a RCW
refreence??


--mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top