LinkFormat.BreakLink 方法 (Word)LinkFormat.BreakLink method (Word)

中斷來源檔案與指定之 OLE 物件、圖片或連結欄位之間的連結。Breaks the link between the source file and the specified OLE object, picture, or linked field.

語法Syntax

expression.expression. BreakLink

需要 expressionexpression Required. 代表 'LinkFormat' 物件的變數。A variable that represents a 'LinkFormat' object.

註解Remarks

在您使用此方法後,如果來源檔已變更,此連結結果將不會自動更新。After you use this method, the link result won't be automatically updated if the source file is changed.

範例Example

這則範例會更新,然後中斷使用中文件內所有圖案 (連結的 OLE 物件) 的連結。This example updates and then breaks the links to any shapes that are linked OLE objects in the active document.

Dim shapeLoop As Shape 
 
For Each shapeLoop In ActiveDocument.Shapes 
 With shapeLoop 
 If .Type = msoLinkedOLEObject Then 
 .LinkFormat.Update 
 .LinkFormat.BreakLink 
 End If 
 End With 
Next shapeLoop

請參閱See also

LinkFormat 物件LinkFormat Object

支援和意見反應Support and feedback

有關於 Office VBA 或這份文件的問題或意見反應嗎?Have questions or feedback about Office VBA or this documentation? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.