Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns or sets a String that represents the text that appears on the face of a web command button. Read/write.
Syntax
expression.ButtonText
expression A variable that represents a WebCommandButton object.
Return value
String
Example
This example creates a new web command button, assigns text to appear on its face, and specifies an email 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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.