表示隐藏的 Web 字段,这些字段允许网页在提交网页时将不可见数据传递给 Web 服务器。 WebHiddenFields 对象允许控制附加到“提交”命令按钮的所有隐藏字段。
备注
使用 WebCommandButton 对象的 HiddenFields 属性访问隐藏的 Web 字段。
示例
本示例将新的隐藏 Web 字段添加到新的 “提交” 命令按钮。
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
方法
属性
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。