Shapes.AddTextbox 方法

定义

向文档添加文本框。 返回一个 Shape 对象,该对象代表文本框并将其添加到集合中 Shapes

public Microsoft.Office.Interop.Word.Shape AddTextbox (Microsoft.Office.Core.MsoTextOrientation Orientation, float Left, float Top, float Width, float Height, ref object Anchor);
abstract member AddTextbox : Microsoft.Office.Core.MsoTextOrientation * single * single * single * single * obj -> Microsoft.Office.Interop.Word.Shape
Public Function AddTextbox (Orientation As MsoTextOrientation, Left As Single, Top As Single, Width As Single, Height As Single, Optional ByRef Anchor As Object) As Shape

参数

Orientation
MsoTextOrientation

必需 MsoTextOrientation。 文本的方向。 由于选择或安装的语言支持(例如美国英语)不同,有些常量可能无法使用。

Left
Single

必需 单一。 文本框左边缘的位置(以磅为单位)。

Top
Single

必需 单一。 文本框上边缘的位置(以磅为单位)。

Width
Single

必需 单一。 文本框的宽度(以磅为单位)。

Height
Single

必需 单一。 文本框的高度(以磅为单位)。

Anchor
Object

可选 对象。 一个 Range 对象,表示文本框绑定到的文本。 如果 Anchor 指定 了 ,则定位点将定位在定位范围中第一段的开头。 如果省略此参数,则将自动选择定位区域,并且文本框相对于页面的上边缘和左边缘定位。

返回

适用于