WebHiddenFields Collection

Microsoft Publisher Visual Basic

WebHiddenFields Collection

WebCommandButton WebHiddenFields

Represents hidden Web fields that allow a Web page to pass non-visible data to the Web server when a Web page is submitted. The WebHiddenFields object enables control of all the hidden fields attached to a Submit command button.

Using the WebHiddenFields object

Use the HiddenFields property to access hidden Web fields. This example adds a new hidden Web field to a new Submit command button.

Sub CreateActionWebButton()
    With ActiveDocument.Pages(1).Shapes
        With .AddWebControl _
                (Type:=pbWebControlCommandButton, Left:=150, _
                Top:=150, Width:=75, Height:=36).WebCommandButton
            .ButtonText = "Submit"
            .ButtonType = pbCommandButtonSubmit
            .HiddenFields.Add Name:="User", Value:="PowerUser"
        End With
    End With
End Sub