CurrPar Property

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


IWPParInterface CurrPar;



This is the interface to manipulate the current paragraph. This is the paragraph the cursor (insertion marker) is located within.


When currently text is selected, CurrPar can be used to modify the attributes of the selected text.


You can use this interface to read the text, to manipulate the text and to change the attributes of the paragraph. To change the attributes of all characters in this paragraph use the interface provided by CurrParAttr. If you only need to change the attribute of certain characters use either CharAttr or SetCharAttr.





IWPMemo Memo = wpdllInt1.Memo;

IWPParInterface par = Memo.CurrPar;


// Clears the paragraph


// Appends new text using current writing mode

par.AppendText("Hello World",-1);

// activates all borders

par.Borders = 15;

// and shading

par.ParShading = 30;

par.ParColor = wpdllInt1.ToRGB(Color.Blue);


// read the character at the current position



// Change the indents

par.ParASet((int)WPAT.IndentLeft, 360);

par.ParASet((int)WPAT.IndentFirst, -360);




Important VB6 note:


When using certain interfaces of TextDynamic please first create a variable and assign the value to it. Otherwise You likely get the error "Block variable not defined".


  Dim currpar As IWPParInterface

  Set currpar = wpdllInt1.currpar

[idh_iwpmemo_currpar.htm]    Copyright © 2007 by WPCubed GmbH