InputSection Method

[Top]  [Chapter]  [Previous]  [Next]

Applies to



IWPPageSize InputSection(int Mode);


Creates a new section in the text or locates it for modification.


It returns a reference to the section reference. You need to call ReleaseInt for the returned interface!


Parameter Mode:


a) The value -1 will locate the section which is valid at the current position (may be started in any paragraph before).

In this case the result value can be null! You can use IWPPageSize.GetProp(0) to red the section id of this section. This id can be then used in Memo.BlockAdd to create a header or footer for a specific section.


b) Bitfield:

If bit 2 is set a new paragraph is added after a table.

Bit 1 sets a page break.



// a) Create

IWPPageSize sect;

sect = wpdllInt1.TextCursor.InputSection(1);

sect.Landscape = true



// b) Modify

IWPPageSize sect;

sect = wpdllInt1.TextCursor.InputSection(-1);

if (sect!=null


   sect.Landscape = true;



Note: the select flag (use SetProp/GetProp) to set and read it will be automatically set when a property is changed.


Reference to IWPPageSize interface to modify the page size used by this section.

[idh_iwptextcursor_inputsection.htm]    Copyright © 2007 by WPCubed GmbH