S
seansullivan99
I have a Word document which contains a table which contains a chart.
I wish to automate this from some VBA code which is an Excel document.
Here is the code:-
Dim oMSGraphWrapper As Word.InlineShape
Dim oMSGraphObject As Object
Set oMSGraphWrapper =
ActiveDocument.Tables(1).Range.InlineShapes(1)
oMSGraphWrapper.OLEFormat.Edit
...........
This works fine if the document is saved as an old style .doc file. If
I save the document as a new ".docm" macro enabled document I recieve
the error "91 Object variable or With Block variable not set. on the
last line of the code above.
All help appreciated.
I wish to automate this from some VBA code which is an Excel document.
Here is the code:-
Dim oMSGraphWrapper As Word.InlineShape
Dim oMSGraphObject As Object
Set oMSGraphWrapper =
ActiveDocument.Tables(1).Range.InlineShapes(1)
oMSGraphWrapper.OLEFormat.Edit
...........
This works fine if the document is saved as an old style .doc file. If
I save the document as a new ".docm" macro enabled document I recieve
the error "91 Object variable or With Block variable not set. on the
last line of the code above.
All help appreciated.