Go Back

Creating a form letter with Microsoft Word and xfODBC

Article Number: 1970
First Published:
Modified:
Recent Activity:
Views: 38
OS: Windows
Product: xfODBC

The following outlines one way you can use xfODBC to enable Microsoft Word to access Synergy data. Though perhaps not the most obvious application of your Synergy data, creating form letters is nonetheless a powerful way of using ODBC to perform an important task. This procedure was created using Microsoft Office Word 2007. The steps may vary for other versions of Word.


Note that before you can do the following, you must generate a system catalog for the sample database distributed with Connectivity Series, create a connect file and DSN for the sample database, and create a user that can access the data. Make sure the DSN specifies user name, password, and connect file. If you initialize users and groups, you can use the default user DBADMIN. For more information, see the xfODBC User\'s Guide.


1. Open Microsoft Word. If a new blank document is not already open, click the Office button (in the upper-left corner of the Word window) and select New. Then, in the New Document window, select "Blank document" and click Create.

2. On the Quick Access Toolbar, select the following: Mailings > Start Mail Merge > Step by Step Mail Merge Wizard.

3. On the "Select document type" screen of the Mail Merge wizard, select Letters and click "Next: Starting document."

4. On the "Select starting document" screen, select "Use the current document" and click "Next: Select recipients."

5. On the "Select recipients" screen, select the first option, "Use an existing list," and then, in the "Use an existing list" section, click Browse.

6. In the Select Data Source dialog box, click New Source, which opens the Data Connection Wizard. Select ODBC DSN on the first screen of the wizard, and click Next.

7. In the "Connect to ODBC Data Source" screen of the wizard, select the DSN you created for the sample Synergy database and click Next.

8. In the "Select Database and Table" screen of the wizard, select CUSTOMERS, and then click Next.

In the "Save Data Connection File and Finish" screen, click Finish, and in the Confirm Data Source window, click OK.

9. In the Mail Merge Recipients window, select the recipients that will be used in the merge. Then click OK.

10. Back in the Mail Merge wizard, click "Next: Write your letter."

11. At the top of the new document, press ENTER twice and then type

Dear ,

Press ENTER twice and type

Thank you.

Press ENTER twice and type

Sincerely,

Press ENTER three times and type

CEO

12. Press CTRL+HOME to return the cursor to the top of the Word document.

13. In the Mail Merge wizard (the "Write your letter" screen), click "More items…", select CUST_NAME from the Insert Merge Field dialog box, click Insert, and then close the dialog box.

14. Press ENTER to add a line after the CUST_NAME line, and add CUST_STREET to this line (using the same procedure used for CUST_NAME).

15. Press ENTER to add a line after the CUST_STREET line, and add CUST_CITY, followed by a comma and a space, CUST_STATE, followed by two spaces, and CUST_ZIP.

16. Place the cursor immediately before the comma in the "Dear ," line and insert the CUST_CONTACT field.

17. Close the Insert Merge Field dialog box (if you haven\'t already), and in the Mail Merge wizard, click "Next: Preview your letters."

At this point, you can click "Previous…" to go back to previous steps and modify the form letter, or you can click "Next: Complete the merge" to finish the mail merge process.



THE INFORMATION PROVIDED TO YOU IN THIS SERVICE IS FOR YOUR USE ONLY. THE INFORMATION MAY HAVE BEEN DEVELOPED INTERNALLY BY SYNERGEX OR BY EXTERNAL SOURCES. SYNERGEX MAKES NO WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS INFORMATION, INCLUDING THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SYNERGEX BE LIABLE FOR ANY DAMAGES OR LOSSES INCURRED BY YOU IN USING OR RELYING ON THIS INFORMATION, INCLUDING WITHOUT LIMITATION GENERAL DAMAGES, DIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES, OR LOSS OF PROFITS, EVEN IF SYNERGEX HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Please log in to comment on this article.