傳回或設定字 串 ,代表出現在 Web 命令按鈕正面的文字。 讀取/寫入。
語法
運算式。ButtonText
運算式 代表 WebCommandButton 物件的變數。
傳回值
字串
範例
此範例會建立新的 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 支援與意見反應。