InputTextElement Object

SharePoint Designer Developer Reference

Represents an INPUT element of type "text" in an HTML document.

Interfaces
This object implements the following interfaces

Remarks

Use the tags method to return an ElementCollection collection that represents a collection of all the INPUT elements in a document. Use the Item method to return an InputTextElement object that accesses a specific INPUT element, referenced by ordinal number or by the value of the id attribute. Use the type property to determine the type of INPUT element.

Note

The type property is not a member of the IHTMLElement object; however, it will return valid results for the value of the type attribute for an element, which in this case is "text".

The following example places the first INPUT element in the active document into an IHTMLElement object variable. The example then uses the type property to determine the type of INPUT element, and places the variable into an appropriate object variable, providing access to the properties and methods that relate to INPUT elements of the specified type.

Visual Basic for Applications
Dim objInput As IHTMLElement
Dim objButton As InputButtonElement
Dim objFile As InputFileElement
Dim objHidden As InputHiddenElement
Dim objImage As InputImageElement
Dim objText As InputTextElement
Set objInput = ActiveDocument.all.tags("input").Item(0)
Select Case objInput.Type
    Case "button"
        Set objButton = objInput
    Case "file"
        Set objFile = objInput
    Case "hidden"
        Set objHidden = objInput
    Case "image"
        Set objImage = objInput
    Case "text"
        Set objText = objInput
End Select

See Also