Hi,
There is an issue on removing the image from the word document programmatically. Could you please help us?
We have added an image programmatically in the word document. And we need to remove the same image (mapped to the bookmark) programmatically.
So, here is the code for adding an image to the word:
Image ImageForCallout = Image.FromStream(GetImageforCharts(parenturl, loginName));
Document doc = new Document(storageLocation);
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveToBookmark("Image1");
builder.InsertImage(ImageForCallout, 80, 50);
doc.Save(storageLocation);
We tried one method (doc.Range.Bookmarks.Remove(“Image1”) to remove the image but it throws error. So, how to remove the image from the word document using Aspose word object programmatically?
Thanks.