Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how many lines in a field

Status
Not open for further replies.

domino1352

IS-IT--Management
Nov 20, 2002
40
AU
Is there a way of progamatically tallying how many lines are used when text data is displayed in a screen, I need to account for word wrapping and new lines so I know when to insert a page break on a dynamicaly created document..
thanks
 
Found a way Which works in R6 (uses the new split function)


'<snip>
Dim richText As New NotesRichTextItem(docsource, "temp")
Call richtext.AppendText( docsource.TSDescription(0))
'if field not RT so copy field to one that is
plainText$ = RichText.GetFormattedText( True, noofchars)
'has all the new lines in it ending in a CR
FieldArray = Split(plainText$, Chr(13))
'char 13 is Carriage Return
Print Ubound(FieldArray) +1 'bingo here is the number
'</snip>


Just put it here for anyone else who might be stumped on the same thing


ciao



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top