IsLinked 属性(Word) ChartDataChartData.IsLinked property (Word)

如此 如果图表的数据链接到 Microsoft Excel 工作簿的外部。True if the data for the chart is linked to an external Microsoft Excel workbook. 只读 BooleanRead-only Boolean.

语法Syntax

expressionexpression. IsLinked

_表达式_一个代表 "ChartData" 对象的变量。expression A variable that represents a 'ChartData' object.

备注Remarks

使用 BreakLink 方法以移除对 Excel 工作簿的链接将此属性设置为 FalseUsing the BreakLink method to remove the link to an Excel workbook sets this property to False.

示例Example

下面的示例验证活动文档中第一个图表的数据是否链接到 Excel 工作簿的外部。The following example verifies whether the data for the first chart in the active document is linked to an external Excel workbook. 如果图表的数据链接,则请使用 BreakLink 方法来删除该链接。If the data for the chart is linked, the example then uses the BreakLink method to remove the link. 如果未链接图表的数据,示例使用 Activate 方法显示嵌入图表的数据。If the data for the chart is not linked, the example uses the Activate method to display the embedded data for the chart.

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 With .Chart.ChartData 
 If .IsLinked Then 
 .BreakLink 
 Else 
 .Activate 
 End If 
 End With 
 End If 
End With

另请参阅See also

ChartData 对象ChartData 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.