WebHiddenFields.Add method (Publisher)

Adds a new hidden field to a web form and returns a Long indicating the number of the new field in the WebHiddenFields collection. New fields are always placed at the end of the current field list.

Syntax

expression.Add (Name, Value)

expression A variable that represents a WebHiddenFields object.

Parameters

Name Required/Optional Data type Description
Name Required String The name of the new field.
Value Required String The value of the new field.

Return value

Long

Example

The following example adds a new hidden field to the specified web command button control. Shape one on page one of the active publication must be a web command button control for this example to work.

ActiveDocument.Pages(1).Shapes(1) _ 
 .WebCommandButton.HiddenFields _ 
 .Add Name:="subject", Value:="service request"

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.