Table of contents
TOC
折叠目录
展开目录

WebCommandButton.ButtonText 属性 (发布服务器)WebCommandButton.ButtonText Property (Publisher)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

返回或设置一个字符串,表示 Web 命令按钮的表面上显示的文本。读/写。Returns or sets a String that represents the text that appears on the face of a Web command button. Read/write.

语法Syntax

表达式ButtonTextexpression. ButtonText

_expression_A 表示WebCommandButton对象的变量。_expression_A variable that represents a WebCommandButton object.

返回值Return Value

StringString

示例Example

本示例创建新的 Web 命令按钮,指定要显示于其上的文字,并指定发送表单数据使用的电子邮件地址。This example creates a new Web command button, assigns text to appear on its face, and specifies an e-mail address to which to send the form data.

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
© 2018 Microsoft