Shape.WebTextBox Property (Publisher)
Returns the WebTextBox object associated with the specified shape.
Syntax
expression .WebTextBox
expression A variable that represents a Shape 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.
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