Publisher) (WebCommandButton.PostFormData 屬性

傳回或設定 MsoTriState 常數,指出指定的 Web 命令按鈕控制項在提交表單資料至網頁伺服器時是否使用 Microsoft Visual Basic Get 或 Post 方法。 讀取/寫入。

語法

運算式。PostFormData

運算式 代表 WebCommandButton 物件的變數。

傳回值

MsoTriState

註解

屬性值可以是其中一個 MsoTriState 常數之一 Microsoft Office 類型程式庫中,如下表所示。

常數 描述
msoFalse 控制項會使用 Visual Basic 取得 方法送出表單資料。
msoTrue 控制項會使用 Visual Basic Post 方法送出表單資料。 預設值。

[重新設定] 指令按鈕會忽略此屬性。

範例

此範例會建立網頁表單 [ 提交 ] 命令按鈕,並設定當使用者選擇按鈕時要執行的指令碼路徑和檔案名稱。 此範例也會指定網頁表單應該使用 Visual Basic Get 方法來提交表單資料。

Dim shpNew As Shape 
 
Set shpNew = ActiveDocument.Pages(1).Shapes.AddWebControl _ 
 (Type:=pbWebControlCommandButton, Left:=150, _ 
 Top:=150, Width:=75, Height:=36) 
 
With shpNew.WebCommandButton 
 .ButtonText = "Submit" 
 .ButtonType = pbCommandButtonSubmit 
 .ActionURL = "https://www.tailspintoys.com/" _ 
 & "scripts/ispscript.cgi" 
 .PostFormData = msoFalse 
End With

支援和意見反應

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