发布服务器) (WebCommandButton.ActionURL 属性

返回或设置一个字符串,该 字符串 表示为响应“ 提交 ”按钮单击而执行的服务器端脚本的 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 支持和反馈,获取有关如何接收支持和提供反馈的指南。