'''' This code is part of Document Solutions for Word demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsSystem.LinqImportsGrapeCity.Documents.Word PublicClassRemovePageBreaksFunctionCreateDocx() AsGcWordDocumentDim doc = NewGcWordDocument() doc.Load(Path.Combine("Resources", "WordDocs", "breaks.docx"))ForEach brr In doc.Body.Texts.Where(Function(txt) TypeOf txt IsBreakAndAlsoDirectCast(txt, Break).Type = BreakType.Page).ToArray() brr.Delete()NextDim sec = doc.Body.Sections.FirstDoWhile sec.NextIsNotNothingIf sec.PageSetup.SectionStart <> SectionStart.ContinuousThen sec.PageSetup.SectionStart = SectionStart.ContinuousEndIf sec = sec.NextLoopReturn docEndFunctionEndClass