We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to convert Shape to office math using Java

Dear team,

I am using aspose word java . I am having problem while iterating the paragraph i rejected if paragraph is shape (figure) but math equation are comes under shape i don’t want to reject the math equation. is there any way to convert math equation node type shape to office math and find out the current paragraph is office math or not.

test.zip (26.1 KB)

thanks,
kesavaraman

@keshav07

Your document contains the OLE objects. You can use following code example to detect such shapes. Hope this helps you.

Document doc = new Document(MyDir + "test.docx");
foreach (Shape shape in doc.GetChildNodes(NodeType.Shape, true))
{
    if (shape.OleFormat != null && shape.OleFormat.ProgId.StartsWith("Equation.DSMT4"))
    {
        //Your code...
    }
}