WebHiddenFields Object (Publisher)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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.

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