ControlNameAlreadyExistsException Class (2007 System)

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.

Namespace:  Microsoft.Office.Tools
Assembly:  Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public NotInheritable Class ControlNameAlreadyExistsException _
    Inherits RuntimeException
'Usage
Dim instance As ControlNameAlreadyExistsException
[SerializableAttribute]
public sealed class ControlNameAlreadyExistsException : RuntimeException
[SerializableAttribute]
public ref class ControlNameAlreadyExistsException sealed : public RuntimeException
public final class ControlNameAlreadyExistsException extends RuntimeException

Remarks

You can add controls to Excel workbooks and Word documents at run time by using Visual Studio Tools for Office solutions. For more information, see Adding Controls to Office Documents at Run Time.

Inheritance Hierarchy

System.Object
  System.Exception
    Microsoft.VisualStudio.Tools.Applications.Runtime.RuntimeException
      Microsoft.Office.Tools.ControlNameAlreadyExistsException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

ControlNameAlreadyExistsException Members

Microsoft.Office.Tools Namespace

Other Resources

Adding Controls to Office Documents at Run Time