ControlNameAlreadyExistsException Class
The exception that is thrown when you try to add a control to a Microsoft Office Excel workbook or Microsoft Office Word document at run time, but the name provided for the new control already exists in the workbook or document.
Assembly: Microsoft.Office.Tools.v4.0.Framework (in Microsoft.Office.Tools.v4.0.Framework.dll)
System::Exception
Microsoft.VisualStudio.Tools.Applications.Runtime::RuntimeException
Microsoft.Office.Tools::ControlNameAlreadyExistsException
[SerializableAttribute] [DebuggerNonUserCodeAttribute] [SecurityPermissionAttribute(SecurityAction::Demand, Unrestricted = true)] [SecurityPermissionAttribute(SecurityAction::InheritanceDemand, Unrestricted = true)] public ref class ControlNameAlreadyExistsException sealed : RuntimeException
| Name | Description | |
|---|---|---|
![]() | ControlNameAlreadyExistsException() | This API supports the product infrastructure and is not intended to be used directly from your code. |
![]() | ControlNameAlreadyExistsException(Exception^) | This API supports the product infrastructure and is not intended to be used directly from your code. |
![]() | ControlNameAlreadyExistsException(String^) | This API supports the product infrastructure and is not intended to be used directly from your code. |
![]() | ControlNameAlreadyExistsException(String^, Exception^) | This API supports the product infrastructure and is not intended to be used directly from your code. |
![]() | ControlNameAlreadyExistsException(String^, String^) | This API supports the product infrastructure and is not intended to be used directly from your code. |
![]() | ControlNameAlreadyExistsException(String^, String^, Exception^) | This API supports the product infrastructure and is not intended to be used directly from your code. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | (Inherited from Object.) |
![]() | GetBaseException() | (Inherited from Exception.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetObjectData(SerializationInfo^, StreamingContext) | (Inherited from Exception.) |
![]() | GetType() | (Inherited from Exception.) |
![]() | ToString() | (Inherited from Exception.) |
You can add controls to Excel workbooks and Word documents at run time by using the Office development tools in Visual Studio. For more information, see Adding Controls to Office Documents at Run Time.
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

