Hi !
I want to replace into a document an image with text.
I use Aspose.word version 3.5.3.0
My code :
Document doc = new Document("file.doc");
NodeCollection shapes = null;
shapes = doc.GetChildNodes(NodeType.Shape, true);
foreach (Shape shape in shapes)
{
if (shape.ImageFormat != null)
{
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveTo(shape);
// Replace image to text here
}
}
shapes = doc.GetChildNodes(NodeType.InlineShape, true);
foreach (InlineShape shape in shapes)
{
if (shape.ImageFormat != null)
{
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveTo(shape);
// Replace image to text here
}
}
doc.Save("file.doc");
Thanxs