调整对象 (Excel)Adjustments object (Excel)

包含指定的自选图形、艺术字对象或连接符的调整值的集合。Contains a collection of adjustment values for the specified AutoShape, WordArt object, or connector.

备注Remarks

每个调整值代表调整控点可调整的一种方式。Each adjustment value represents one way that an adjustment handle can be adjusted. 由于某些调整控点可以通过两种方式—进行调整: 例如, 某些控点可以水平和垂直—调整形状的调整值, 而不能有调整柄。Because some adjustment handles can be adjusted in two ways—for example, some handles can be adjusted both horizontally and vertically—a shape can have more adjustment values than it has adjustment handles. 一个形状可以具有至多八个调整。A shape can have up to eight adjustments.

使用 调整 属性返回一个 调整 对象。Use the Adjustments property to return an Adjustments object. 使用调整(索引), 其中_索引_是调整值的索引号, 返回一个调整值。Use Adjustments (index), where index is the adjustment value's index number, to return a single adjustment value.

不同的形状具有不同数量的调整值。Different shapes have different numbers of adjustment values. 不同类型的调整以不同的方式更改形状的几何图形。Different kinds of adjustments change the geometry of a shape in different ways. 此外, 不同类型的调整值具有不同的有效值范围。In addition, different kinds of adjustments have different ranges of valid values. 例如,以下示例显示右箭头标注的四个调整值分别如何影响该标注几何外形的定义。For example, the following illustration shows what each of the four adjustment values for a right-arrow callout contributes to the definition of the callout's geometry.


调

备注

由于每个形状有不同的调整值集,校验指定形状的调整行为的最好方法是手动创建一个图例,在打开宏记录器的情况下作调整,然后检查记录的代码。Because each adjustable shape has a different set of adjustments, the best way to verify the adjustment behavior for a specific shape is to manually create an instance of the shape, make adjustments with the macro recorder turned on, and then examine the recorded code.

下表概述了不同类型的调整所具有的有效的调整值范围。The following table summarizes the ranges of valid adjustment values for different types of adjustments. 多数情况下,如果指定的值超过了有效值范围,将给调整分配最接近该值的有效值。In most cases, if you specify a value that's beyond the range of valid values, the closest valid value will be assigned to the adjustment.

调整类型Type of adjustment 有效值Valid values
线性(水平或垂直)Linear (horizontal or vertical) 通常, 值0.0 表示形状的左边缘或上边缘, 值1.0 表示形状的右边缘或下边缘。Generally the value 0.0 represents the left or top edge of the shape, and the value 1.0 represents the right or bottom edge of the shape. 有效值对应于可手动对形状进行的有效调整。Valid values correspond to valid adjustments that you can make to the shape manually. 例如,如果只能将调整控点手动拖动形状的一半宽度,则相应的调整值最大为 0.5。For example, if you can only pull an adjustment handle half way across the shape manually, the maximum value for the corresponding adjustment will be 0.5.

对于象连接符和标注这样的形状,0.0 和 1.0 值代表由它们的起始和终止点定义的矩形界限,此时负值和大于 1.0 的值是有效的。For shapes such as connectors and callouts, where the values 0.0 and 1.0 represent the limits of the rectangle defined by the starting and ending points of the connector or callout line, negative numbers and numbers greater than 1.0 are valid values.
射线Radial 调整值 1.0 对应于形状宽度。An adjustment value of 1.0 corresponds to the width of the shape. 最大值为 0.5,或形状宽度的一半。The maximum value is 0.5, or half way across the shape.
Angle 以度为单位表示的值。Values are expressed in degrees. 如果指定的值超出了180到180的范围, 则它将被规范化为在该范围内。If you specify a value outside the range 180 to 180, it will be normalized to be within that range.

示例Example

本示例向 myDocument 中添加右箭头标注,并且设置该标注的调整值。The following example adds a right-arrow callout to myDocument and sets adjustment values for the callout. 请注意,尽管形状只有三个调整控点,但是它有四个调整值。Note that although the shape has only three adjustment handles, it has four adjustments. 第三个和第四个调整值都对应于箭头的头颈之间的控点。Adjustments three and four both correspond to the handle between the head and neck of the arrow.

Set myDocument = Worksheets(1) 
Set rac = myDocument.Shapes.AddShape(msoShapeRightArrowCallout, _ 
 10, 10, 250, 190) 
With rac.Adjustments 
 .Item(1) = 0.5 'adjusts width of text box 
 .Item(2) = 0.15 'adjusts width of arrow head 
 .Item(3) = 0.8 'adjusts length of arrow head 
 .Item(4) = 0.4 'adjusts width of arrow neck 
End With

属性Properties

另请参阅See also

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.