This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


May 12, 2017, 5:12 PM
16 Posts

Grabbing specifict text from a richtext field

  • Category: Domino Designer
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 1

I have an email that has information like the following in the body:

 

First Name             John Doe

Email                       jdoe@ficticiouscompany.com

Phone                     555 555 1212

Education              BABS

 

Anyway, I want to parse through the body of the email to pluck out the email address.

 

I searched around, and I was thinking I have done something like this before, but I can't seem to get at the data.

Any one have a bit of code they wouldn't mind sharing that lets me search through a notesrichtextitem for a information between two values. I was thinking in my example, I'd like to grab the text between the text Email and the text Phone.

 

Thanks in advance.

Betsy Thiede

May 12, 2017, 6:45 PM
326 Posts
sample

Dim rti as NotesRichTextItem
dim strVal as string


Set rti = doc.GetFirstItem("Body")
strVal = rti.Text


'convert tab, lf, to space

strval = replace(strval,asc(5)," ")
strval = replace(strval,asc(10)," ")
strval = replace(strval,asc(13)," ")


'locate "email" in the str
i1 = instr(lcase(strval,"email ")

'strip email off"
strval=trim(mid(strval,i1+5))
locate "phone" n the string

i1 = trim(instr(trim(strval,"phone")

'set new variable to what is between those 2 strings
emailaddress = trim(instr(strval,1,i1))

 


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal