In my word there is image, when i’m converting to HTML, I need to add id attribute of image in html.
Thanks for your inquiry. Please note that Aspose.Words mimics the behavior of MS Word. Aspose.Words does not provide API to set the shape ID. The image is imported as Shape node in Aspose.Words’ DOM. In your case, we suggest you please use Shape.AlternativeText property to set the alternative text as image id.
Thanks for your inquiry. Following code example shows how to set the alternative text of Shape. Hope this helps you.
Document doc = new Document(MyDir + "in.docx");
Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
shape.AlternativeText = "123";
doc.Save(MyDir + "output.html");