Free Support Forum -

Identify chart shapes in a Word document

Is the Aspose Words API able to distinguish charts from other shapes in a Word document? Word interop provides a way to detect chart shapes via the InLineShape.HasChart property, but we are unable to find corresponding functionality in Aspose Words.

Please advise.

Hi Lloyd,

A new feature request to support this feature has been logged into our issue tracking system as WORDSNET-11858. We will keep you updated on this issue in this thread.

Best Regards,

The issues you have found earlier (filed as WORDSNET-11858) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
<span style="font-size:10.0pt;font-family:"Arial","sans-serif";

mso-fareast-font-family:“Times New Roman”;mso-ansi-language:EN-US;mso-fareast-language:
JA;mso-bidi-language:AR-SA">Is it possible to convert charts to images within the document?

Please advise.
<!–[if gte mso 9]>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}


Hi Lloyd,

Thanks for your inquiry. You can use the following code to convert Chart to Image:

Document doc = new Document(MyDir + @“in.docx”);

DocumentBuilder builder = new DocumentBuilder(doc);

NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);

foreach (Shape shape in shapes)


if (shape.HasChart)


using (MemoryStream stream = new MemoryStream())


ShapeRenderer renderer = shape.GetShapeRenderer();

renderer.Save(stream, new ImageSaveOptions(SaveFormat.Png));






int shapesCount = shapes.Count;

for (int i = 0; i < shapesCount; i++)


Shape s = (Shape)shapes[i];

if (s.HasChart)





doc.Save(MyDir + @“15.6.0.docx”);

I hope, this helps.

Best regards,

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for .NET 18.12 update and this Aspose.Words for Java 18.12 update.