IndexOf issue

Hi, I need help. I have a PDF with over 50 CVs. I have string manipulation to segregate each CV. These are the codes.

increase = 0
for each loop - for each name
n = text.IndexOf(name.ToString)
n2 = text.IndexOf(“I agree to all of them”, text.IndexOf(“I agree to all of them”) +increase)
nn = text.Substring(n,(n2-n))
increase = increase +1
end of loop

However, the problem is n2’s number does not increase after 18771 some reason even though the “I agree to all of them” words are repeated like 50 times.
image

Kindly help. Thank you xoxo

is your name variable a integer? if so, remove .tostring.

name variable is a generic variable with mixture of string and integer. I tried removing the .tostring but in vain

Do you have an example of your workflow and data?

Main.xaml (123.9 KB)

Sample text file:

jordy choo

By clicking “Agree”, I hereby certify that I have read and understood all of the clauses above and that I agree to all of them.

chettiar pillai

By clicking “Agree”, I hereby certify that I have read and understood all of the clauses above and that I agree to all of them.

Bee Choo

By clicking “Agree”, I hereby certify that I have read and understood all of the clauses above and that I agree to all of them.

Any solutions anyone? Pls help

Sorry, for whatever reason your xaml isn’t opening for me, it keeps losing all activities. so i won’t be able to assist :frowning:

You can try this one, just reinstall some packages would do
Main.xaml (136.6 KB)
bulkCompile_20181031.pdf (376.2 KB)