WebCommandButton.ActionURL 属性 (Publisher)

返回或设置一个 String 类型的值,该值代表要为响应 “提交 ”按钮单击而执行的服务器端脚本的 URL。 读/写。

语法

表达式ActionURL

表达 一个代表 WebCommandButton 对象的变量。

返回值

String

备注

ActionURL 属性的默认值为 https://example.microsoft.com/~user/ispscript.cgi。 对于“重置”命令按钮,将忽略此属性。

示例

本示例创建一个 Web 窗体 “提交 ”命令按钮,并设置在用户选择该按钮时要运行的脚本路径和文件名。

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

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。