Table of contents
TOC
Collapse the table of content
Expand the table of content

WebCommandButton.ButtonType Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns or sets a PbCommandButtonType constant that indicates whether a Web command button will clear or submit 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 submit 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