It would use some string manupulation but it would be doable. From the file retrieve the whole text as string in a microflow. Create a counter. Use the find to find the first space (see https://world.mendix.com/display/refguide5/String+function+calls for some examples). Use the substring to split the string up and raise the counter. When you reach 500 take the original string and remove from this the substring of the result. You then have your first 500 word line.
It could be simpeler when there is a carriage return on the end of the 500 words. Then you filter on that for the string manipulation.
Regards,
Ronald
You could try something like this
InputStream fstream = Core.getFileDocumentContent(getContext(), file.getMendixObject());
BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
while ((strLine = br.readLine()) != null) {do your create object here}
the file mentioned here is as proxy object that is a specialization of System.filedocument