Table of contents

TabStops.Add 方法 (发布服务器)TabStops.Add Method (Publisher)

office 365 dev account|上次更新日期: 2018/3/13
3 参与人员

将新的制表位添加到指定TabStops集合。Adds a new tab stop to the specified TabStops collection.


表达式添加位置对齐方式前导符expression. Add( Position, Alignment, Leader)

_expression_A 表示一个TabStops对象的变量。_expression_A variable that represents a TabStops object.


名称Name必需/可选Required/Optional数据类型Data Type说明Description
PositionPosition必需RequiredVariantVariant新制表位相对于文本框架的左边缘的水平位置。数值以磅为单位计算;字符串使用指定的单位计算,可以使用 Microsoft Publisher 支持的任何度量单位(例如,“2.5 英寸”)。The horizontal position of the new tab stop relative to the left edge of the text frame. Numeric values are evaluated in points; strings are evaluated in the units specified and can be in any measurement unit supported by Microsoft Publisher (for example, "2.5 in").
对齐方式Alignment必需RequiredPbTabAlignmentTypePbTabAlignmentType制表位的对齐方式设置。The alignment setting for the tab stop.
前导符Leader必需RequiredPbTabLeaderTypePbTabLeaderType制表位的前导符类型。The type of leader for the tab stop.


对齐方式可以是其中一个 PbTabAlignmentType 常量。Alignment can be one of these PbTabAlignmentType constants.

| pbTabAlignmentCenter| |pbTabAlignmentDecimal| |pbTabAlignmentLeading| |pbTabAlignmentTrailing|领导者可以是其中一个PbTabLeaderType常量。| pbTabAlignmentCenter| | pbTabAlignmentDecimal| | pbTabAlignmentLeading| | pbTabAlignmentTrailing| Leader can be one of these PbTabLeaderType constants.

| pbTabLeaderBullet| |pbTabLeaderDashes| |pbTabLeaderDot| |pbTabLeaderLine| |pbTabLeaderNone|| pbTabLeaderBullet| | pbTabLeaderDashes| | pbTabLeaderDot| | pbTabLeaderLine| | pbTabLeaderNone|


下面的示例将新的左对齐制表位添加到距指定文本框架的左边缘 0.5 英寸的位置。The following example adds a new left-aligned tab stop 0.5 inches from the left edge of the specified text frame.

ActiveDocument.Pages(1).Shapes(1).TextFrame _ 
 .TextRange.ParagraphFormat.Tabs _ 
 .Add Position:="0.5 in", _ 
 Alignment:=pbTabAlignmentLeading, _ 
© 2018 Microsoft