T
tingletanglebob
Hi,
I am currently writing a COM-AddIn for Word, Excel, Visio and PP. Because of
an incorporation of Office into an EDRMS System I have to make changes via
their API which uses System._ComObject objects. Certain new Toolbar objects
in word etc. must be refreshed after a document was saved. Due to the missing
"Document_After_Save" I am using a Timer (System.Timers.Timer) which then
refreshes the new Toolbar objects. This works fine so far, but Word, Excel
etc. finishes not properly (there is still a Task running in the TaskManager,
even if there is no application window visible anymore).
I was able to pinpoint it down to the Timer. Each Time the Timer uses a
System._ComObject (e.g. the Office 2003 Tollbar objects) it leaves a task in
the Taskmanager. If I am using purely .Net during the Timer Event it works
fine and the Application shuts down properly. I tried things like forcing the
Garbage collection etc. but nothing helps.
What can be the problem for the .Net Timer using Com - Objects?
I appreciate any suggestions - thanks in advance
I am currently writing a COM-AddIn for Word, Excel, Visio and PP. Because of
an incorporation of Office into an EDRMS System I have to make changes via
their API which uses System._ComObject objects. Certain new Toolbar objects
in word etc. must be refreshed after a document was saved. Due to the missing
"Document_After_Save" I am using a Timer (System.Timers.Timer) which then
refreshes the new Toolbar objects. This works fine so far, but Word, Excel
etc. finishes not properly (there is still a Task running in the TaskManager,
even if there is no application window visible anymore).
I was able to pinpoint it down to the Timer. Each Time the Timer uses a
System._ComObject (e.g. the Office 2003 Tollbar objects) it leaves a task in
the Taskmanager. If I am using purely .Net during the Timer Event it works
fine and the Application shuts down properly. I tried things like forcing the
Garbage collection etc. but nothing helps.
What can be the problem for the .Net Timer using Com - Objects?
I appreciate any suggestions - thanks in advance