Office application does not quit after automation from Visual Studio .NET client (317109)
The information in this article applies to:
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual C# .NET (2003)
- Microsoft Visual Basic .NET (2002)
- Microsoft Visual C# .NET (2002)
This article was previously published under Q317109 SYMPTOMS When you automate a Microsoft Office application from
Microsoft Visual Basic .NET or Microsoft Visual C# .NET, the Office application does not quit when
you call the Quit method. CAUSE When Visual Studio .NET calls a COM object from managed
code, it automatically creates a Runtime Callable Wrapper (RCW). The RCW
marshals calls between the .NET application and the COM object. The RCW keeps a
reference count on the COM object. Therefore, if all references have not been
released on the RCW, the COM object does not quit. RESOLUTION To make sure that the Office application quits, make sure
that your automation code meets the following criteria: STATUSThis
behavior is by design.
Modification Type: | Major | Last Reviewed: | 9/3/2004 |
---|
Keywords: | kbAutomation kbprb KB317109 |
---|
|