Edit

Share via


WebHiddenFields.Name method (Publisher)

Returns a String that represents the name of a hidden web field for a web command button.

Syntax

expression.Name (Index)

expression A variable that represents a WebHiddenFields object.

Parameters

Name Required/Optional Data type Description
Index Required Long The index number of the hidden field.

Return value

String

Example

This example creates a web command button with a hidden field, and then displays the field's name.

Sub GetHiddenWebFieldName() 
 With ActiveDocument.Pages(1).Shapes.AddWebControl _ 
 (Type:=pbWebControlCommandButton, _ 
 Left:=100, Top:=100, Width:=100, _ 
 Height:=36).WebCommandButton.HiddenFields 
 .Add Name:="User", Value:="Power" 
 MsgBox "The name of the first hidden field is " & .Name(1) 
 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.