Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Could anyone suggest how to access the Text in Chart properties of the presentation tab using Macro?
Thanks and regards,
Vj
Hi.
There is Texts array in the Chart properties.
set Graph = ActiveDocument.Sheets("Main").CreateBarChart
Graph.AddDimension "ProductType"
Graph.AddExpression "sum(Amount)"
Graph.AddText "My text",100,100
set p = Graph.GetProperties
p.ChartProperties.Texts(0).Position.Width = 100
p.ChartProperties.Texts(0).Position.Height = 25
p.ChartProperties.Texts(0).TextAdjust = 1 'center
p.ChartProperties.Texts(0).Transparent = false
p.ChartProperties.Texts(0).BgColor.PrimaryCol.IsCalculated = false
p.ChartProperties.Texts(0).BgColor.PrimaryCol.Col = RGB(255,255,0) '
Graph.SetProperties p
Additional information about the text properties you can find at APIGuide.qvw.
The class name for the Text in Chart is IChartTextDef.
Hi.
There is Texts array in the Chart properties.
set Graph = ActiveDocument.Sheets("Main").CreateBarChart
Graph.AddDimension "ProductType"
Graph.AddExpression "sum(Amount)"
Graph.AddText "My text",100,100
set p = Graph.GetProperties
p.ChartProperties.Texts(0).Position.Width = 100
p.ChartProperties.Texts(0).Position.Height = 25
p.ChartProperties.Texts(0).TextAdjust = 1 'center
p.ChartProperties.Texts(0).Transparent = false
p.ChartProperties.Texts(0).BgColor.PrimaryCol.IsCalculated = false
p.ChartProperties.Texts(0).BgColor.PrimaryCol.Col = RGB(255,255,0) '
Graph.SetProperties p
Additional information about the text properties you can find at APIGuide.qvw.
The class name for the Text in Chart is IChartTextDef.