Receive a correct splitted String

Hey guys,

I am struggling with splitting some sender arrays in my needed format.

I have created a process with getting my Outlook Mail messages (unread and in my explicit folder), this works fine.
Now i would like to split my sender message, to get the full email adress.

This is my code…
For splitting my sender - sender.Split(CChar("<"))

image

My Problem is, i cant access the splitted string… And I dont know why.
I try to reach my strSender with the strSender.ToString() method but I just receive the type of the element…
image

I normally would split my String like this…

Receive this string …
“Myname, IsmyName(Department)” Myname.ismymail@mail.com

  1. Split it into Myname.ismymail@mail.com>
  2. Split it into Myname.ismymail@mail.com

Does anybody know how to solve the error?

Thanks! :slight_smile:
Greetings

String.Split() returns an array of strings. Use (index) after the split to access the string.

FirstWord = "Hello World".Split()(0)
SecondWord = "Hello World".Split()(1)

FirstWord will be “Hello” and SecondWord will be “World”.

Hi,
If your Email ID is like “My Name is Khan” my.khan@gmail.com
You can Follow the below steps

StrVal = “My Name is Khan” my.khan@gmail.com
SplitStrVal = StrVal.split("<".toCharArray) // SplitStrVal - is Array of string type
resultEmailId = SplitStrVal(1).Replace(">","") //resultEmailId - String Type and Replaces > with empty

Please try this way. hope it helps to solve .
Mark as solution if it works

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.