linkedinfacebooktwittermenuarrow-up

GemBox Support Forum

How to remove picture from word document

How to remove picture from word document

Try this:

var document = DocumentModel.Load("input.docx");

var picture = (Picture)document.GetChildElements(true, ElementType.Picture).First();
picture.Content.Delete();

document.Save("output.docx");