![]() |
Re: Manipulating existing Chart Object in MS Word using .NET
Nomination for Article of the month - Sep 2009 Started. Nominate this article.
|
Re: Manipulating existing Chart Object in MS Word using .NET
Valuable information.
|
Re: Manipulating existing Chart Object in MS Word using .NET
Thank you for the interesting post.
I have tried to integrate your code into a C# project of mine but unfortunately I keep getting COM Errors. Code: foreach (InlineShape inlineShape in _wordApp.ActiveDocument.InlineShapes)Where _wordApp is a reference to an open Word Application which has an empty Document in it with a couple of charts. This code fails on the following line: inlineShape.Activate() with the following COM-Exception: HRESULT: 0x800A1704. After removing the line, it fails on the next line: Chart chart = (Chart)inlineShape.OLEFormat.Object; with the following COM-Exception: HRESULT: 0x800401FD (CO_E_OBJNOTCONNECTED)) Does anyone have an idea on how to fix this? This might not be the proper place to ask this kind of question, but the documentation concerning the Microsoft.Office.Interop.Graph.dll is limited to say the least. Basically what I am trying to achieve is manipulating the data of an already existing chart in a Word-Document at runtime. There is another type of chart (Insert -> Picture -> Chart), which is even less documented and doesn't seem to even support OLEFormat.Object. Thanks for the help, Larrabee |
| All times are GMT +5.5. The time now is 13:06. |