I have a Rich Text field or simply a Text field. I want to process the information in this field, how ever I want to process it line by line which means that I will get the first line first, when I encounter a carriage return then it will consider as second line? How do I do this?
Use GetFormattedText to get content of richtext as plain text2. Make use of split(text$, chr(9)) method to retrieve richtext item text values as an array. Use forall method to loop thru the array values.
Subject: RE: How to read a text field line by line
Sub GetADP
RptName = "C:\folder\file.txt"
Open RptName For Input As #1
Do While Not Eof(1)
Line Input #1, InLine
'you've got ahold of the line, so just parse out what you need and assign the values to variables to use later
Loop
Close #1
Code was stripped from working agent, so it may not work right if just copied/pasted, but you get the idea.