need help regarding automation of rgb to cmyk conversion of my book

I designed a book  which is about 335 pages in CD X6 I have to convert it to rgb to cmyk before its given for print and for this I need to goto edit-->Find and Replace-->replace a color model or palette -->(click) next--> (radio button)find a color model---> (select) RGB ---> replace colors used as--->(radio button) Fills or outline and I have to go through this painful process for 2 times 1 for fills 2nd time for outlines for each page please help can't their be any automation process to convert all the document at once I have heard vb script or macros can do this automation process but I don't know where and what to write in corel draw to automate this RGB to CMYK conversion. somebody please help.