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

Free Support Forum - aspose.com

Remove image previously added with bookmark

I everyone! I have an issue with my project app. I would like to remove an image which was previously added with a bookmark. In fact the user can take photos, automatically the app add the taken image to the words file looking for a specific bookmark.

Now if the user edit or remove this photo, the words document must be edited.
I looked on google and on this forum but no good answer for the moment.

Here is my actual code where I move to the bookmark and I add the image without removing the bm_photos bookmark because I use it again in order to insert another photos :

Document doc = new Document(FilePhoto);
DocumentBuilder builder = new DocumentBuilder(doc);

Bookmark bm_photos = doc.Range.Bookmarks ["photos"];
builder.MoveToBookmark ("photos");

builder.MoveToBookmark ("travaux_photos");

builder.InsertImage (PhotoPath, 700, 394);



Hi there,

Thanks for your inquiry. You may move cursor to desired bookmark and then can get Shape type node and use Shape.Remove method to remove it. Hopefully it will help you to accomplish the task. However, if the issue persists then please share your sample document here, we will look into it and will guide you accordingly.

Best Regards,