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

CalloutFormat.Length 属性 (发布服务器)CalloutFormat.Length Property (Publisher)

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

返回一个variant 类型的值,该值指示第一段 (附加到文本标注框的线段) 在标注线的长度 (以磅为单位) 如果指定标注的AutoLength属性设置为False。否则,就会出错。只读的。Returns a Variant indicating the length (in points) of the first segment of the callout line (the segment attached to the text callout box) if the AutoLength property of the specified callout is set to False. Otherwise, an error occurs. Read-only.

语法Syntax

表达式长度expression. Length

_expression_A 表示CalloutFormat对象的变量。_expression_A variable that represents a CalloutFormat object.

注解Remarks

此属性仅适用于标注其行包含多个段 (类型msoCalloutThreemsoCalloutFour)。This property applies only to callouts whose lines consist of more than one segment (types msoCalloutThree and msoCalloutFour).

使用CustomLength方法来设置此属性的值。Use the CustomLength method to set the value of this property.

示例Example

如果名为 co1 的标注的第一个直线段具有固定长度,本示例会将名为 co2 的标注的第一个直线段的长度也指定为该固定长度。为了使本示例生效,两个标注都必须具有多段直线。If the first line segment in the callout named co1 has a fixed length, this example specifies that the length of the first line segment in the callout named co2 will also be fixed at that length. For the example to work, both callouts must have multiple-segment lines.

Dim len1 As Single 

With ActiveDocument.Pages(1).Shapes 
 With .Item("co1").Callout 
 If Not .AutoLength Then len1 = .Length 
 End With 
 If len1 Then .Item("co2").Callout _ 
 .CustomLength Length:=len1 
End With
© 2018 Microsoft