PostFormData Property

       

Returns or sets an MsoTriState constant indicating whether the specified Web command button control uses the Get or Post method when submitting form data to a Web server. Read/write.

MsoTriState can be one of these MsoTriState constants.
msoCTrue  Not used with this property.
msoFalse  The control uses the Visual Basic Get method to submit form data.
msoTriStateMixed  Not used with this property.
msoTriStateToggle  Not used with this property.
msoTrue default  The control uses the Visual Basic Post method to submit form data.

expression.PostFormData

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

Remarks

This property is ignored for Reset command buttons.

Example

This example creates a Web form Submit command button and sets the script path and file name to run when a user clicks the button. The example also specifies that the Web form should use the Visual Basic Get method to submit form data.

Dim shpNew As Shape

Set shpNew = ActiveDocument.Pages(1).Shapes.AddWebControl _
    (Type:=pbWebControlCommandButton, Left:=150, _
    Top:=150, Width:=75, Height:=36)

With shpNew.WebCommandButton
    .ButtonText = "Submit"
    .ButtonType = pbCommandButtonSubmit
    .ActionURL = "http://www.yourcompanyname.com/" _
        & "scripts/ispscript.cgi"
    .PostFormData = msoFalse
End With