Word) (TextFrame.BreakForwardLink 方法
中斷指定文字圖文框的前導連結 (如果此連結存在話)。
語法
expression. BreakForwardLink
需要 expression。 代表 TextFrame 物件的變數。
註解
若對圖案鏈中間的圖案套用此方法,而該圖案鏈包含連線的文字框架,就會中斷該圖案鍊,而成為兩組連結的圖案。 但是所有文字將仍留在第一組連結圖案中。
範例
這則範例會建立新的文件、在文件中加入一個由三個連結文字方塊組成的鏈結,然後中斷第二個文字方塊後面的連結。
Dim shapeTextbox1 As Shape
Dim shapeTextbox2 As Shape
Dim shapeTextbox3 As Shape
Documents.Add
Set shapeTextbox1 = ActiveDocument.Shapes.AddTextbox _
(Orientation:=msoTextOrientationHorizontal, _
Left:=InchesToPoints(1.5), _
Top:=InchesToPoints(0.5), _
Width:=InchesToPoints(1), _
Height:=InchesToPoints(0.5))
shapeTextbox1.TextFrame.TextRange = "This is some text. " _
& "This is some more text. This is even more text."
Set shapeTextbox2 = ActiveDocument.Shapes.AddTextbox _
(Orientation:=msoTextOrientationHorizontal, _
Left:=InchesToPoints(1.5), _
Top:=InchesToPoints(1.5), _
Width:=InchesToPoints(1), _
Height:=InchesToPoints(0.5))
Set shapeTextbox3 = ActiveDocument.Shapes.AddTextbox _
(Orientation:=msoTextOrientationHorizontal, _
Left:=InchesToPoints(1.5), _
Top:=InchesToPoints(2.5), _
Width:=InchesToPoints(1), _
Height:=InchesToPoints(0.5))
shapeTextbox1.TextFrame.Next = shapeTextbox2.TextFrame
shapeTextbox2.TextFrame.Next = shapeTextbox3.TextFrame
MsgBox "Textboxes 1, 2, and 3 are linked."
shapeTextbox2.TextFrame.BreakForwardLink
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。