Word 2007 Chart Automation problem
- From: seansullivan99@xxxxxxxxxxx
- Date: Thu, 28 Aug 2008 02:50:18 -0700 (PDT)
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.
.
- Prev by Date: RE: VBA Training
- Next by Date: Excel Programming: SetItem and SetValue Does Not Work
- Previous by thread: .NET / Outlook interop and saving attachments: a mysterious except
- Next by thread: Excel Programming: SetItem and SetValue Does Not Work
- Index(es):