This documentation is archived and is not being maintained.

WebTextBox Property.WebTextBox Property

Office 2007
Returns the WebTextBox object associated with the specified shape.

Syntax

expression.WebTextBox

expression   A variable that represents a WebTextBox Property object.

Return Value
WebTextBox

Example

This example creates a new Web text box, specifies default text, indicates that entry is required, and limits entry to 50 characters.

Visual Basic for Applications
Dim shpNew As Shape
Dim wtbTemp As WebTextBox

Set shpNew = ActiveDocument.Pages(1).Shapes _
    .AddWebControl(Type:=pbWebControlSingleLineTextBox, _
    Left:=100, Top:=100, Width:=150, Height:=15)

Set wtbTemp = shpNew.WebTextBox

With wtbTemp
.DefaultText = "Please Enter Your Full Name"
    .RequiredControl = msoTrue
    .Limit = 50
End With

See Also


Show: