Shape.WebTextBox 属性 (Publisher)

返回与指定形状关联的 WebTextBox 对象。

语法

表达式WebTextBox

表达 一个代表 Shape 对象的变量。

返回值

WebTextBox

示例

此示例创建一个新的 Web 文本框,指定默认文本,指示需要输入,并将条目限制为 50 个字符。

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

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。