SelectPara Script

Build 1501 on 14/Nov/2017  This topic last edited on: 19/Sep/2013, at 13:52

Description

Select paragraph with its styles.

Note: it inserts the EOP at the end of the paragraph, if it does not exists yet, therefore, in that case it works only if the text is read-write.

Syntax

SelectPara

Code

Sub SelectPara()

  ' new version: selects with style

   Text.CursorStartPara()

   Text.CursorEndPara()

  If Text.CursorRight = EFAILED Then Text.InsSpecialChar(SpecialChar.HardRet)

   Text.CursorLeft()

   Text.CursorStartPara()

   Text.EditBlockStart()

   Text.CursorEndPara()

   Text.CursorRight()

   Text.EditBlockEnd()

End Sub