Publisher) (WebCommandButton.ButtonType 屬性

會傳回或設定指出 Web 命令按鈕是否清除或提交表單資料的 PbCommandButtonType 常 數。 讀取/寫入。

語法

運算式ButtonType

表達 代表 WebCommandButton 物件的 變數。

傳回值

PbCommandButtonType

註解

ButtonType屬性值可以是 Microsoft Publisher 類型程式庫中所宣告的PbCommandButtonType常數之一。

範例

此範例會建立新的 Web 命令按鈕、指派要出現在其臉部上的文字,以及指定要傳送表單資料的電子郵件地址。

Sub NewWebForm() 
 With ActiveDocument.Pages.Add(Count:=1, After:=1) 
 With .Shapes.AddWebControl(Type:=pbWebControlCommandButton, _ 
 Left:=72, Top:=72, Width:=72, Height:=36) 
 With .WebCommandButton 
 .ButtonType = pbCommandButtonSubmit 
 .ButtonText = "Send Form:" 
 .EmailAddress = "someone@example.com" 
 End With 
 End With 
 End With 
End Sub

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應