Section Constructor (SectionTypes, String, String, Boolean) |
Namespace: SOWIDocument.Word
public Section( SectionTypes pType, string pValue, string pStyle = "", bool pNewParagraph = false )
//* declaration SOWIIntegral OpenDocument Word document * SOWIDocument.Word.Document lDOC = new SOWIDocument.Word.Document(DOCXFile);; //* declaration text sections * List<SOWIDocument.Word.Section> lSections = new List<SOWIDocument.Word.Section>(); lSections.Add(new SOWIDocument.Word.Section(SOWIDocument.Word.SectionType.Text, "Test text 1", pNewParagraph: true)); lSections.Add(new SOWIDocument.Word.Section(SOWIDocument.Word.SectionType.Text, "Text vor MergeField", pNewParagraph: false)); lSections.Add(new SOWIDocument.Word.Section(SOWIDocument.Word.SectionType.Text, " ")); lSections.Add(new SOWIDocument.Word.Section(SOWIDocument.Word.SectionType.MergeField, "TestMergeField1", pNewParagraph: false)); lSections.Add(new SOWIDocument.Word.Section(SOWIDocument.Word.SectionType.Text, " ")); lSections.Add(new SOWIDocument.Word.Section(SOWIDocument.Word.SectionType.Text, "Text nach MergeField", pNewParagraph: true)); lSections.Add(new SOWIDocument.Word.Section(SOWIDocument.Word.SectionType.Text, "New line after merge field")); //* "texts" and "merge fields" write to documentation bookmarks (BookmarkTest and BookmarkTestIntoTable") * lDOC.BookmarkAdd("BookmarkTest", lSections); lDOC.BookmarkAdd("BookmarkTestIntoTable", lSections); lDOC.Close();