Publisher) (WebCommandButton.ButtonType 属性

返回或设置 PbCommandButtonType 常量,该常量指示 Web 命令按钮是清除还是提交窗体数据。 读/写。

语法

表达式。ButtonType

表达式 表示 WebCommandButton 对象的变量。

返回值

PbCommandButtonType

备注

ButtonType 属性值可以是在 Microsoft Publisher 类型库中声明的 PbCommandButtonType 常量之一。

示例

此示例创建了一个新的 Web 命令按钮,分配文本显示在其正面,并指定要向其发送窗体数据的电子邮件地址。

Sub NewWebForm() 
 With ActiveDocument.Pages.Add(Count:=1, After:=1) 
 With .Shapes.AddWebControl(Type:=pbWebControlCommandButton, _ 
 Left:=72, Top:=72, Width:=72, Height:=36) 
 With .WebCommandButton 
 .ButtonType = pbCommandButtonSubmit 
 .ButtonText = "Send Form:" 
 .EmailAddress = "someone@example.com" 
 End With 
 End With 
 End With 
End Sub

支持和反馈

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