返回或设置表示在 Web 命令按钮正面显示的文本的 字符串 。 读/写。
语法
表达式。ButtonText
表达式 表示 WebCommandButton 对象的变量。
返回值
字符串
示例
此示例创建了一个新的 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 支持和反馈,获取有关如何接收支持和提供反馈的指南。