次の方法で共有


TextFrame.BreakForwardLink メソッド (Publisher)

指定されたテキスト枠に、次のテキスト枠へのリンクが設定されている場合、このリンクを解除します。

構文

BreakForwardLink

TextFrame オブジェクトを表す変数。

注釈

リンクされたテキスト フレームを持つ図形のチェーンの中央にある図形にこのメソッドを適用すると、チェーンが切断され、2 つのリンクされた図形のセットが残ります。 ただし、すべてのテキストはリンクされた図形の最初の一連に残ります。

次の使用例は、新しい文書を作成し、文書に 3 つのテキスト ボックスを追加してリンクを作成します。次に、2 番目のテキスト ボックスの後でリンクを解除します。

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 のサポートおよびフィードバックを参照してください。