ReturnDataLabel Property

Microsoft Publisher Visual Basic

expression.ReturnDataLabel

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example creates a new Web text box and specifies the label for the text in the text box when the page is submitted.

Sub LabelWebTextBoxControl()
    With ActiveDocument.Pages(1).Shapes _
            .AddWebControl(Type:=pbWebControlSingleLineTextBox, _
            Left:=100, Top:=100, Width:=300, Height:=15).WebTextBox
        .DefaultText = "Please enter your name here"
        .Limit = 70
        .RequiredControl = msoTrue
        .ReturnDataLabel = "Full_Name"
    End With
End Sub