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

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

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

返回或设置一个MsoTriState常量,该常量表示标注线与标注文本框的连接位置的地方是否更改根据 (即标注指向的点) 标注线条的原点标注文本框的左右。读/写。Returns or sets an MsoTriStateconstant indicating whether the place where the callout line attaches to the callout text box changes depending on whether the origin of the callout line (where the callout points) is to the left or right of the callout text box. Read/write.

语法Syntax

表达式AutoAttachexpression. AutoAttach

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

返回值Return Value

MsoTriStateMsoTriState

注解Remarks

AutoAttach属性值可以是一种 * * MsoTriState* * 在 Microsoft Office 类型库中声明常量。The AutoAttach property value can be one of the ** MsoTriState** constants declared in the Microsoft Office type library.

当此属性的值为msoTrue时,原点右侧的文本框时从文本框的顶部测量落差值 (标注文本框边缘到标注线附加位置的垂直距离)和文本框中为起点的左侧时从文本框底端测量。当此属性的值为msoFalse时,垂直距离始终被距离顶部的文本框中,而不考虑文本框和起点的相对位置。使用CustomDrop方法来设置垂直距离,并使用删除属性返回垂直距离。When the value of this property is msoTrue, the drop value (the vertical distance from the edge of the callout text box to the place where the callout line attaches) is measured from the top of the text box when the text box is to the right of the origin, and it is measured from the bottom of the text box when the text box is to the left of the origin. When the value of this property is msoFalse, the drop value is always measured from the top of the text box, regardless of the relative positions of the text box and the origin. Use the CustomDropmethod to set the drop value, and use the Dropproperty to return the drop value.

只有在它设置了显式设置此属性会影响标注垂直距离 — — 也就是说,如果DropType属性的值是msoCalloutDropCustom。默认情况下,标注有明确设置垂直时创建它们。Setting this property affects a callout only if it has an explicitly set drop value—that is, if the value of the DropTypeproperty is msoCalloutDropCustom. By default, callouts have explicitly set drop values when they are created.

示例Example

本示例将两个标注添加到第一页。其中一个标注自动连接,另一个则不自动连接。如果将自动连接标注的标注线条原点更改到连接文本框的右边,该文本框的位置也会发生改变。没有自动连接的标注就不会出现这种情况。This example adds two callouts to the first page. One of the callouts is automatically attached and the other is not. If you change the callout line origin for the automatically attached callout to the right of the attached text box, the position of the text box changes. The callout that is not automatically attached does not display this behavior.

With ActivePublication.Pages(1).Shapes 
 With .AddCallout(Type:=msoCalloutTwo, _ 
 Left:=420, Top:=170, Width:=200, Height:=50) 
 .TextFrame.TextRange.Text = "auto-attached" 
 .Callout.AutoAttach = msoTrue 
 End With 
 With .AddCallout(Type:=msoCalloutTwo, _ 
 Left:=420, Top:=350, Width:=200, Height:=50) 
 .TextFrame.TextRange.Text = "not auto-attached" 
 .Callout.AutoAttach = msoFalse 
 End With 
End With 
© 2018 Microsoft