Share via


ButtonType Property [Publisher 2003 VBA Language Reference]

PbCommandButtonType

PbCommandButtonType can be one of these PbCommandButtonType constants.
pbCommandButtonReset
pbCommandButtonSubmit

expression.ButtonType

expression Required. An expression that returns one of the objects in the Applies To list.

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

Applies to | WebCommandButton Object