Function TParagraph.StartNewSection(with_undo:Boolean) : TWPRTFSectionProps

Unit: WPRTEDefs
Class: WPRTEDefs.TParagraph

Parameters

  • with_undo:Boolean

Returns

The type of the result value is TWPRTFSectionProps.

Description

This function creates a new section object which can be used to specify a different page size or margins and modifies this paragraph to make this paragraph and the following text be part of this section. The Section ends with the next paragraph which starts a section on its own.
Please make sure to set the Select property BEFORE you modify any properties: with WPRichText1.ActivePar.StartNewSection(false) do begin Select := [wpsec_PageSize]; // 1. Landscape := true; // 2. end;