How create a large list of document ids in VI

How can I create a large list of document ids, about a 1,000 or more in a list without having to type them in?

If I can list these documents ids with one command I know how to transfer the output to a new vi list.

But how can I strip unwanted extra information in this list and leave only the document ids?

How can I insert certain words over and over again in this file without having to type a 1,000 times?

Please let me know

thanks

Ruben

write a shell script of LOOP