Publisher) (WebTextBox 物件

代表 Web 文字方塊控制項。 WebTextBox 物件是 Shape 物件的成員。

註解

使用 Shapes.AddWebControl 方法建立新的網頁文字方塊。

使用 Shape.WebTextBox 屬性存取 Web 文字方塊控制項圖形。

範例

此範例會建立新的 Web 文字方塊、指定預設文字、指出輸入為必要,並將輸入限制為 50 個字元。

Sub CreateWebTextBox() 
 With ActiveDocument.Pages(1).Shapes 
 With .AddWebControl(Type:=pbWebControlSingleLineTextBox, _ 
 Left:=100, Top:=100, Width:=150, Height:=15).WebTextBox 
 .DefaultText = "Please Enter Your Full Name" 
 .RequiredControl = msoTrue 
 .Limit = 50 
 End With 
 End With 
End Sub

屬性

另請參閱

支援和意見反應

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