Browse » Home
Monday, May 16, 2011
How to Use a Database in MS Office Word
1. Open Word and begin to create a form letter for use in Word's mail merge feature: click 'Tools, 'Mailings,' 'Start mail merge,' and then 'Step by step mail merge wizard.'
2. Open Microsoft Access (or another application that can create data tables, e.g. Excel) and create a table with the following data. Type the top row that follows as the table's header:fname,lname,city,state
John,Smith,Jonestown,NY
Betty,Crocker,Smithville,MASave the sample data with the filename 'mydata.'
3. Return to Word and select the 'Letters' option in the mail merge window. Click the 'Starting document' link at the bottom of that window, then 'Use the current document' at the 'Select starting document' prompt.
4. Choose 'Use an existing list' at the 'Select recipients' prompt, then click the 'Browse' button. Select the 'mydata' table you created earlier using the 'Select Data Source' dialog box, then press 'Open.' Press 'OK' in the 'Mail merge recipients' dialog box to import all data rows.
5. Click the 'Write your letter' link in the mail merge window, then paste the following sample letter into the document:To:
«fname», «lname»
«city», «state»
Dear «fname»:
Thank you for purchasing from our company. I hope you and your neighbors in «city» enjoy the product.
Regards,
The Big Company
6. Replace each of the words in the sample letter that are surrounded by the '<<' and '>>' characters, with the corresponding Merge Field code: for '<<fname>>,' for example, select the complete '<<fname>>' text, and then press 'Insert merge field,' on Word's toolbar, followed by clicking 'fname.'
7. Press the mail merge window's 'Preview your letters' link after inserting all merge fields. Press the '<<' and '>>' buttons in the merge window to see how Word has replaced each of the merge codes you inserted with the data from the database table. Print or save the resulting document.
8. You can also create a database in Word for use in another application. Paste the sample data from step 2 into a new Word document. Save the document as 'WordDatabase.csv,' and choose the 'plain text' option in the 'Save as type' drop-down box.
9. Open Microsoft Access and select 'External Data,' followed by 'Text file.' Select the Word file you just created in the 'Get external data' dialog box in Access. Click the '...new table...' option in that dialog box.
10. Continue through the dialog box by pressing 'Next' until you see the screen containing the text 'First row contains field name.' Check the box next to that text, then press 'Finish,' followed by 'Close' to complete the data import. Notice that Access has created a new table that duplicates your Word table. Use that table as you would any kind of table in Access: for queries, to link to other customer data, or for Word mail merges, for example.