Publisher) (WebCommandButton 物件

代表 Web 命令按鈕控制項。 WebCommandButton 物件是 Shape 物件的成員。

註解

使用 Shapes.AddWebControl 方法建立新的 Web 命令按鈕。

使用 Shape.WebCommandButton 屬性存取 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 支援與意見反應。