WebTextBox.RequiredControl property (Publisher)
Specifies whether an entry into a web text box control is required. Read/write.
Syntax
expression.RequiredControl
expression A variable that represents a WebTextBox object.
Return value
MsoTriState
Remarks
The RequiredControl property value can be one of the MsoTriState constants declared in the Microsoft Office type library and shown in the following table.
Constant | Description |
---|---|
msoFalse | Indicates that entry into the specified web text box control is not required. |
msoTrue | Indicates that entry into the specified web text box control is required. |
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 an entry is required.
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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for