Dependencies:
DocumentFormat.OpenXml.dll (version 2.0.3930.0)
Imports:
DocumentFormat.OpenXml.WordProcessing
DocumentFormat.OpenXml.Packaging
Code Snippet
- Private Sub DeletePageBreaks(ByRef myDoc As WordprocessingDocument)
- Dim noBreaks As List(Of Break) = myDoc.MainDocumentPart.Document.Descendants(Of Break)().ToList()
- For Each brk As Break In noBreaks
- brk.Remove()
- Next
- myDoc.MainDocumentPart.Document.Save(myDoc.MainDocumentPart.GetStream(FileMode.Create))
- End Sub
No comments:
Post a Comment