Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-27-2009, 11:00 AM
krazykasper krazykasper is offline
Novice
 
Join Date: Apr 2009
Posts: 1
krazykasper is on a distinguished road
Smile 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
Reply With Quote
  #2  
Old 04-29-2009, 02:44 PM
Bird_FAT's Avatar
Bird_FAT Bird_FAT is offline Office 2007
Expert
 
Join Date: Apr 2009
Location: South East
Posts: 271
Bird_FAT is on a distinguished road
Default

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!

  1. You say the customer name ALWAYS follows a date - so are the ONLY instances of a date the ones that come before a customer name?
  2. What format is the date in: 02/02/09 - Feb 02 2009 - etc.
  3. Are you also looking to batch import the letters into one file? before the rest takes place?

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 ...
Reply With Quote
Reply

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

Other Forums: Access Forums

All times are GMT -7. The time now is 01:05 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft