Edit

Share via


WebCommandButton.ActionURL property (Publisher)

Returns or sets a String that represents the URL of the server-side script to execute in response to a Submit button click. Read/write.

Syntax

expression.ActionURL

expression A variable that represents a WebCommandButton object.

Return value

String

Remarks

The default value for the ActionURL property is https://example.microsoft.com/~user/ispscript.cgi. 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 chooses the button.

Sub CreateActionWebButton() 
 With ActiveDocument.Pages(1).Shapes.AddWebControl _ 
 (Type:=pbWebControlCommandButton, Left:=150, _ 
 Top:=150, Width:=75, Height:=36).WebCommandButton 
 .ButtonText = "Submit" 
 .ButtonType = pbCommandButtonSubmit 
 .ActionURL = "https://www.tailspintoys.com/" & _ 
 "scripts/ispscript.cgi" 
 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.