TextFrame.BreakForwardLink 方法 (Publisher)

在链接存在的情况下,断开指定文本框架的前向链接。

语法

表达式BreakForwardLink

表达 一个代表 TextFrame 对象的变量。

备注

将此方法应用于包含链接文本框架的形状链中间的形状会中断链,从而保留两组链接的形状。 但是,所有文本仍保留在第一个链接的形状系列中。

示例

本示例创建一个新出版物,向其添加一个由三个相链接的文本框组成的链,然后断开第二个文本框之后的链接。

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

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。