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

TextFrame.BreakForwardLink 方法 (发布服务器)TextFrame.BreakForwardLink Method (Publisher)

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

在链接存在的情况下,断开指定文本框的前向链接。Breaks the forward link for the specified text frame, if such a link exists.

语法Syntax

表达式BreakForwardLinkexpression. BreakForwardLink

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

注解Remarks

如果将此方法应用于图形,且该图形位于一串与图文框相链接的图形的中间位置,则会使链接断开,而形成两组链接的图形。但所有文本都将保留在第一组链接的图形中。Applying this method to a shape in the middle of a chain of shapes with linked text frames will break the chain, leaving two sets of linked shapes. All of the text, however, will remain in the first series of linked shapes.

示例Example

本示例创建一个新出版物,向其添加一个由三个相链接的文本框组成的链,然后断开第二个文本框之后的链接。This example creates a new publication, adds a chain of three linked text boxes to it, and then breaks the link after the second text box.

Sub BreakTextLink() 
 Dim shpTextbox1 As Shape 
 Dim shpTextbox2 As Shape 
 Dim shpTextbox3 As Shape 

 Set shpTextbox1 = ActiveDocument.Pages(1).Shapes.AddTextbox _ 
 (Orientation:=msoTextOrientationHorizontal, _ 
 Left:=72, Top:=36, Width:=72, Height:=36) 
 shpTextbox1.TextFrame.TextRange = "This is some text. " _ 
 &; "This is some more text. This is even more text. " _ 
 &; "And this is some more text and even more text." 

 Set shpTextbox2 = ActiveDocument.Pages(1).Shapes.AddTextbox _ 
 (Orientation:=msoTextOrientationHorizontal, _ 
 Left:=72, Top:=108, Width:=72, Height:=36) 

 Set shpTextbox3 = ActiveDocument.Pages(1).Shapes.AddTextbox _ 
 (Orientation:=msoTextOrientationHorizontal, _ 
 Left:=72, Top:=180, Width:=72, Height:=36) 

 shpTextbox1.TextFrame.NextLinkedTextFrame = shpTextbox2.TextFrame 
 shpTextbox2.TextFrame.NextLinkedTextFrame = shpTextbox3.TextFrame 
 MsgBox "Textboxes 1, 2, and 3 are linked." 
 shpTextbox2.TextFrame.BreakForwardLink 
End Sub
© 2018 Microsoft