A
AndersN
Hi, in the sample application "Word Controls" a Graph chart is accessed by
its "parent" shape named "Example4Chart".
How is this shape created and how is it named?
This is the sample code that finds the reference to the Graph.chart object:
// Activates the embedded object first.
object chartName = "Example4Chart";
Word.Shape example4Chart = this.Shapes.get_Item(ref chartName);
example4Chart.Activate();
// Accesses actual Graph.Chart object.
Graph.Chart chart = null;
try
{
chart = example4Chart.OLEFormat.Object as Graph.Chart;
chart.ChartType = chartType;
}
Thanks for your help
its "parent" shape named "Example4Chart".
How is this shape created and how is it named?
This is the sample code that finds the reference to the Graph.chart object:
// Activates the embedded object first.
object chartName = "Example4Chart";
Word.Shape example4Chart = this.Shapes.get_Item(ref chartName);
example4Chart.Activate();
// Accesses actual Graph.Chart object.
Graph.Chart chart = null;
try
{
chart = example4Chart.OLEFormat.Object as Graph.Chart;
chart.ChartType = chartType;
}
Thanks for your help