Click here to Skip to main content
15,891,409 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I am trying to code a vb.net program that updates chart objects in a word file. The charts are embedded in the word file at various locations.

I managed to do it by directly accessing the chart using:

If .Item(i).Type = WdInlineShapeType.wdInlineShapeEmbeddedOLEObject Then
   Dim chartShape As Word.InlineShape = WA.Selection.Document.InlineShapes.Item(4)


The problem is that after a change in the file (I don't remember doing anything..) the order of the inline objects is screwed up..!

Is it possible the attach some kind of description on the object so that I will be able to know which one I access each time?

Thanks in advance!
Posted
Updated 19-Apr-10 22:04pm
v2

You can try adding comments to the chart. I think that would be the easiest way to get this going.
 
Share this answer
 
Thank you,

I used the WA.Selection.Document.InlineShapes.Item(i).AlternativeText property to do the trick ;) That is after setting the appropriate text inside the word->emmbeded obj->format obj->Alt txt in every object I wanted to manipulate.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900