Publisher) (WebCommandButton.ActionURL 屬性

會傳回或設定 String ,代表要執行以回應 [ 提交 ] 按鈕按一下的伺服器端腳本 URL。 讀取/寫入。

語法

運算式ActionURL

表達 代表 WebCommandButton 物件的 變數。

傳回值

字串

註解

ActionURL屬性的預設值為 https://example.microsoft.com/~user/ispscript.cgi[重新設定] 指令按鈕會忽略此屬性。

範例

本範例會建立 Web 表單 Submit 命令按鈕,並設定當使用者選擇按鈕時要執行的腳本路徑和檔案名。

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 支援與意見反應