Table of contents
TOC
Collapse the table of content
Expand the table of content

WebTextBox.DefaultText Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns or sets a String that represents the default text in a Web text box control. Read/write.

Syntax

expression. DefaultText

_expression_A variable that represents a WebTextBox object.

Return Value

String

Example

This example creates a new Web text box control in the active publication, sets the default text and the character limit for the text box, and specifies that it is a required control.

Sub AddWebTextBoxControl() 
 With ActiveDocument.Pages(1).Shapes.AddWebControl _ 
 (Type:=pbWebControlMultiLineTextBox, Left:=72, _ 
 Top:=72, Width:=300, Height:=100).WebTextBox 
 .DefaultText = "Please enter text here." 
 .Limit = 200 
 .RequiredControl = msoTrue 
 End With 
End Sub
© 2018 Microsoft