In my job I use an Oracle-based system to generate work estimates, with each estimate saved as a record. When I need to print the entire collection out, the tool generates a Word document instead of handling printing duties itself. The Word document generated is over 400 pages long with more than 200 individual task estimate forms, some as long as 10 pages, with the task forms separated by a section break. There are no page numbers in the raw output from the database.
" Would like to decrease the manual effort, even automate the page numbering process as much as possible. Selecting the entire document and trying to insert page numbers doesnt appear to work as the command only affects the current section.
" Would like to minimize the manual labor required to create a Table of Contents using text found in a specific table cell on each task form (see example on next page).
I'm using Word 2007. The document has to be produced on demand, usually every couple of weeks. It currently takes me hours to edit the document by hand, adding page numbers section by section and then selecting the specific words I want in the Table of Contents and using the TOC Add Text button to add them to the TOC. I'd like to create a macro to do as much of the work as possible, but I'm more familiar with Excel's object model than Word's, so I'm starting at square one. Barring a macro approach, I need some tips to better understand some of Word's capabilities and limitations when it comes to generating a TOC and page numbering.
A sample document is attached that contains two edited task estimate forms and a hand worked TOC stub. I noticed that I can't copy and paste text from the forms also... must be some kind of protection that I haven't figured out how to manage in Word 2007 yet.
Any help or a pointer to the required resources would be greatly appreciated.