Shape.WebCommandButton 属性 (Publisher)

返回与指定形状关联的 WebCommandButton 对象。

语法

表达式WebCommandButton

表达 一个代表 Shape 对象的变量。

返回值

WebCommandButton

示例

本示例创建一个 Web 窗体 “提交 ”命令按钮,并设置在用户选择该按钮时要运行的脚本路径和文件名。

Dim shpNew As Shape 
Dim wcbTemp As WebCommandButton 
 
Set shpNew = ActiveDocument.Pages(1).Shapes.AddWebControl _ 
 (Type:=pbWebControlCommandButton, Left:=150, _ 
 Top:=150, Width:=75, Height:=36) 
 
Set wcbTemp = shpNew.WebCommandButton 
 
With wcbTemp 
 .ButtonText = "Submit" 
 .ButtonType = pbCommandButtonSubmit 
 .ActionURL = "https://www.tailspintoys.com/" _ 
 & "scripts/ispscript.cgi" 
End With

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。