表示 Web 命令按钮控件。 WebCommandButton 对象是 Shape 对象的成员。
备注
使用 Shapes.AddWebControl 方法创建新的 Web 命令按钮。
使用 Shape.WebCommandButton 属性访问 Web 命令按钮控件形状。
示例
本示例创建一个 Web 窗体 “提交 ”命令按钮,并设置在用户选择该按钮时要运行的脚本路径和文件名。
Sub CreateActionWebButton()
With ActiveDocument.Pages(1).Shapes.AddWebControl _
(Type:=pbWebControlCommandButton, Left:=150, _
Top:=150, Width:=75, Height:=36).WebCommandButton
.ButtonText = "Submit"
.ButtonType = pbCommandButtonSubmit
.ActionURL = "https://www.tailspintoys.com/" _
& "scripts/ispscript.cgi"
End With
End Sub
属性
- ActionURL
- 应用程序
- ButtonText
- ButtonType
- DataFileFormat
- DataFileName
- DataRetrievalMethod
- EmailAddress
- EmailSubject
- HiddenFields
- Parent
- PostFormData
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。