GroupDocsGists
10/19/2017 - 11:09 AM

Documents-RemoveShapeWordDocument.vb

' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Using doc As WordsDocument = Document.Load(Of WordsDocument)(Utilities.MapSourceFilePath(FilePath))
    ' Remove shape by index
    doc.Sections(0).Shapes.RemoveAt(0)

    ' Remove shape by reference
    doc.Sections(0).Shapes.Remove(doc.Sections(0).Shapes(0))

    doc.Save()
End Using