P
PeterS
Hi All,
I'm using office 2007.
In some previous posts (from Jean-Guy Marcil ) I found a snipplet how to
access embedded OLE objects (ChartObject in word doc) and I tried following:
Sub Chart_Test_02()
Dim LE As Word.OLEFormat
Dim e_Chart As Excel.ChartObject
For ISCnt = 1 To ActiveDocument.InlineShapes.Count
IST = ActiveDocument.InlineShapes.Item(ISCnt).Type
If IST = wdInlineShapeChart Then
ActiveDocument.InlineShapes.Item(ISCnt).Select
Set LE = ActiveDocument.Shapes(ISCnt).OLEFormat
LE.DoVerb wdOLEVerbPrimary
SET e_Chart = LE.Object ===>> here comes "Syntax error"
End If
Next ISCnt
End Sub
<<<<<
I get allways this syntax error. I have no idea why. Do you have any idea?
I'm using office 2007.
In some previous posts (from Jean-Guy Marcil ) I found a snipplet how to
access embedded OLE objects (ChartObject in word doc) and I tried following:
Sub Chart_Test_02()
Dim LE As Word.OLEFormat
Dim e_Chart As Excel.ChartObject
For ISCnt = 1 To ActiveDocument.InlineShapes.Count
IST = ActiveDocument.InlineShapes.Item(ISCnt).Type
If IST = wdInlineShapeChart Then
ActiveDocument.InlineShapes.Item(ISCnt).Select
Set LE = ActiveDocument.Shapes(ISCnt).OLEFormat
LE.DoVerb wdOLEVerbPrimary
SET e_Chart = LE.Object ===>> here comes "Syntax error"
End If
Next ISCnt
End Sub
<<<<<
I get allways this syntax error. I have no idea why. Do you have any idea?