Is there a way to make a macro that will automatically split a large file into smaller ones when it encounters a specific string (I have made this work) and then save all the new files to a specified fixed location, using as a filename the first word of each file, trimmed from whitespaces?
But your explanation is a little bit poor. It would be good to show us with a block what active file contains on execution of macro/script and what should be produced by the macro/script. It would be enough to post a block of about 20-30 lines enclosed in code tags (button above edit field) showing active file contents and 2-3 "code" blocks showing what the created files should contain and which names the files should have.
non-serviam wrote: using as a filename the first word of each file, trimmed from whitespaces
A word cannot contain spaces. So this statement is not clear for me at all.