ControlCollection.Item Property (String)
Gets the control with the specified name.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)
Syntax
'Declaration
ReadOnly Default Property Item ( _
name As String _
) As Object
Object this[
string name
] { get; }
Parameters
- name
Type: System.String
The string that represents the name of the control.
Property Value
Type: System.Object
The control with the specified name.
Remarks
For controls that you add programmatically, the name parameter should contain the name that you specify as the last parameter of the Add<control> method, not the Name property of the control.
For controls that you add at design time, the name parameter should contain the identifier.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.