Split mail body string every new line

Hey guys,
I have a problem to split a mail body every line. If I try to split this I get no result. The messagebox just shows “System.String”. Where is my failure?

Thanks in advance

Thanks and kind regards

1 Like

buddy @Feley
mailinhalt is a array buddy as you split the mailbody
So if you want any specific value, pass a index to mailinhalt
mailinhalt(0).Tostring or mailinhalt(1).ToString


use a for each loop and pass the input as mailinhalt
and inside the for eachloop hve message box with input as item.tostring

Hope this would help you buddy


1 Like

Thank you very much! It’s working

1 Like

Thats amazing, keep going buddy


if I want to split for example mailinhalt(6) into two parts and want to use the second, how can I do this?
The value for mailinhalt(6) is: “Name Leon”
I just want to have “Leon” as string

1 Like

Buddy, @Feley

To get Leon from “Name Leon” in mailinhalt(6) use like this buddy

split(mailinhalt(6," ")(1).Tostring

which will give you the Leon alone


1 Like

Thank you very much @Palaniyappan

But it’s not working for me. An error appears.
“Option Strict On” disallows to convert String into Integer. And the index value is to high for the numbers of dimensions in the array

1 Like


Split(mailinhalt(6)," ")(1).ToString

Spit(mailinhalt(6," ")(1)).ToString

Hope you can differ it…

Cheers buddy.

1 Like

@Palaniyappan thank you very much!

1 Like

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