#1
|
|||
|
|||
MS Word 2003 – Generating a ToC
On a quarterly basis I generate about 500 letters from data in MS Access reports. There are 20 different reports, each report based on varying criteria. I need to “sort” all of the letters by customer name.
Currently, I export the report data into rtf (Rich text Format) files; then pull the files (INSERT-FILE) into a Word document that has the graphics in the header and footer, margins set, etc. I then manually flag each customer name as “Heading1” and generate a ToC. Once the ToC is generated I can go into Outline View (VIEW-OUTLINE) and sort the letters. This manual step is time consuming and prone to errors. Is there a way to “automatically” format the customer name with Heading1? The name always follows the date on the letter. Perhaps a macro of some kind? I tried using Find/Replace but it doesn't recognize the imported text unless I change it all to "Clear Formatting". I appreciate any and all suggestions. Krazy (Bill) Kasper Last edited by krazykasper; 04-27-2009 at 12:43 PM. Reason: Added text |
#2
|
||||
|
||||
Hey krazykasper,
Could you answer a few questions for me about your files and aims?! I think that it could be possible to help you with some form of VBA code to suit your needs, I just need to have a bit clearer a picture of where I'm starting with this!
Have you not thought of generating a separate Report in your db that would do all the sorting and merging for you? Then you would only need the bit of code to add the Heading styles (which is pretty much the simplest bit to make really! - though thinking about it, you should even be able to get the Report to add the heading style already!!). it's even possible to use a command button on a form in Access that would print the letters as you do now, and then save the new report afterwards - all with one click! If you are still determined to do all this in Word, then let me know the answers to the questions at the top and I'll have a go at putting something together for you ... |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word 2003 Dictionaries... | JaedenRuiner | Word | 0 | 02-27-2009 03:04 PM |
Word 2003 Shift F3 | FLMT | Word | 0 | 02-22-2009 08:11 AM |
Help with Word 2003 | jobeone | Word | 0 | 12-02-2008 07:01 AM |
Word 2003 problem | Garry Jones | Word | 2 | 07-10-2006 05:05 AM |
Access 2003 query with wildcards into Word 2003 mail merge | Poingdexter | Office | 1 | 10-30-2005 06:17 PM |