Table of contents
TOC
折叠目录
展开目录

ShapeRange.IncrementTop 方法 (发布服务器)ShapeRange.IncrementTop Method (Publisher)

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

按指定的距离垂直移动指定的形状或形状范围。Moves the specified shape or shape range vertically by the specified distance.

语法Syntax

表达式IncrementTop增量expression. IncrementTop( Increment)

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

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
增量Increment必需RequiredVariantVariant形状或形状范围要移动的垂直距离。正值表示将形状或形状范围向下移动;负值表示将形状或形状范围向上移动。数值按磅计算,字符串则可以使用 Microsoft Publisher 支持的任何单位(例如,“2.5 英寸”)。The vertical distance to move the shape or shape range. A positive value moves the shape or shape range down; a negative value moves it up. Numeric values are evaluated in points; strings can be in any units supported by Microsoft Publisher (for example, "2.5 in").

返回值Return Value

Nothing

注解Remarks

使用IncrementLeft方法水平移动形状或形状范围。Use the IncrementLeft method to move shapes or shape ranges horizontally.

示例Example

以下示例复制当前出版物的第一个形状,设置该副本的填充,将其向右移动 70 磅并向上移动 50 磅,然后顺时针旋转 30 度。This example duplicates the first shape on the active publication, sets the fill for the duplicate, moves it 70 points to the right and 50 points up, and rotates it 30 degrees clockwise.

With ActiveDocument.Pages(1).Shapes(1).Duplicate 
 .Fill.PresetTextured PresetTexture:=msoTextureGranite 
 .IncrementLeft Increment:=70 
 .IncrementTop Increment:=-50 
 .IncrementRotation Increment:=30 
End With
© 2018 Microsoft