![]() ![]() Insert the page break after the searched text using () method.Initialize an instance of Break class to create a page break.Get the position index of the text range in the paragraph using () method.Get the paragraph where the text range is located using ParagraphBase.OwnerParagraph property. ![]() Access the text range of the searched text using TextSelection.GetAsOneRange() method.Find a specific text using Document.FindString() method.Load a Word document using Document.LoadFromFile() method.The following are the steps to insert a page break after a specific text: Paragraph.AppendBreak(BreakType.PageBreak)ĭocument.SaveToFile("InsertPageBreak.docx", FileFormat.Docx2013) Private Shared Sub Main(ByVal args As String())ĭim document As Document = New Document()ĭim section As Section = document.Sections(0)ĭim paragraph As Paragraph = section.Paragraphs(1)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |