A
Alex St-Pierre
Hi !
I'm wondering if there a way to modify a text box inside a chart ?
1)When I loop on the text box of the ActiveDocument (Dim sh As Word.Shape,
For Each sh In ThisDocument.Shapes, Debug.Print sh.Name), the text box inside
the word chart is not include.
2) I tried the following to edit the graph but I don't know how to reach the
text box range include in the chart. Any idea?
Dim rng As Word.Range
Dim of As Word.OLEFormat
Dim oChart As Graph.Chart
Set rng = ThisDocument.Bookmarks("BarChart").Range
Set of = rng.InlineShapes(1).OLEFormat
On Error Resume Next
of.DoVerb wdOLEVerbInPlaceActivate
On Error GoTo 0
Set oChart = of.Object
Thank you!
Alex
I'm wondering if there a way to modify a text box inside a chart ?
1)When I loop on the text box of the ActiveDocument (Dim sh As Word.Shape,
For Each sh In ThisDocument.Shapes, Debug.Print sh.Name), the text box inside
the word chart is not include.
2) I tried the following to edit the graph but I don't know how to reach the
text box range include in the chart. Any idea?
Dim rng As Word.Range
Dim of As Word.OLEFormat
Dim oChart As Graph.Chart
Set rng = ThisDocument.Bookmarks("BarChart").Range
Set of = rng.InlineShapes(1).OLEFormat
On Error Resume Next
of.DoVerb wdOLEVerbInPlaceActivate
On Error GoTo 0
Set oChart = of.Object
Thank you!
Alex