WebCommandButton.ButtonType property (Publisher)
Returns or sets a PbCommandButtonType constant that indicates whether a web command button clears or submits form data. Read/write.
Syntax
expression.ButtonType
expression A variable that represents a WebCommandButton object.
Return value
PbCommandButtonType
Remarks
The ButtonType property value can be one of the PbCommandButtonType constants declared in the Microsoft Publisher type library.
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for