Hi, I have some address in notes email format as an array and each element is like this:
AddStr(0):“FirstName1 LastName1/domin/sub/abcd/CA”,
AddStr(1):“FirstName2 LastName2/domin/sub/abcd/CA”,
…
…
Now, I need to loop all of the address of that array and return a new array which each element only contains for first part (FirstName1 LastName1)
I tried to use Left or LeftBack, it seems not working. Any idea? I think it is because the “/”.
Subject: How to get this substring?
look at Strleft, i.e., Strleft(AddStr(x),“/”)
In formula language, @Left( AddStr; “/”)
Subject: How to get this substring?
Try something like this:
Dim username As NotesName
Dim newArr(0) As String
Redim newArr(Ubound(AddStr)) As String
For i = 0 to Ubound(addStr)
Set username = New NotesName(AddStr(i))
newArr(i) = username.CommonUserName
Next
You should use the NotesName class for names, not string operations.