Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the workbook that contains the chart data associated with the chart. Read-only Object.
Version Information
Version Added: Word 2007
Syntax
expression .Workbook
expression A variable that represents a ChartData object.
Remarks
Note
You must call the Activate method before referencing this property; otherwise, an error occurs.
Example
The following example activates the Microsoft Excel workbook associated with the first chart in the active document. If the Excel workbook has multiple windows, the example activates the first window. The example then copies the contents of cells B1 through B5 and pastes the cell contents into the chart.
With ActiveDocument.InlineShapes(1)
If .HasChart Then
.Chart.ChartData.Activate
.Chart.ChartData.Workbook. _
Worksheets("Sheet1").Range("B1:B5").Copy
.Chart.Paste
End If
End With