Oracle desktop integration

Using your query with Mail Merge

By Ben Lamb, 4th February 2005

Now that you have opened the data source, you are now ready to use the data retrieved. The rest of the toolbar will now be active.

Mail Merge Toolbar 3

Now you can add fields and text to make your document.

Creating the Word Document

To insert a formatted greeting in your document, click the "Insert Greeting" button.

Mail Merge Toolbar 4

Once pressed you will be able to enter a greeting specifying the format that is apropriete for the document you are creating.

Greeting Line

If the greeting seems to be picking up the wrong fields for the persons name, you can match the fields by pressing the "Match Fields" button.

Here you can specify what field from the database matches the Required information by using the drop down box to choose the database fields.

Match Fields

Once added the greeting line will appear as <<GreetingLine>> in the Word document.

If you want to add database fields manually, you can do this by clicking the "Insert Merge Fields" button

Mail Merge Toolbar 5

From here you can pick the field you want to add and simply click insert.

Insert Merge Field

Below is an example document containing a Greeting and a database field mixed in with some normal text.

Mail Merge Preview

If you want to see the document with the data inserted you can click on the "View Merged Data" button

Mail Merge Toolbar 6

Once this has been pressed you can see what the document will look like.

To scroll though all the different records, press the buttons shown below.

Mail Merge Toolbar 7

Once satisfied with the document, you can export it to a Word document, printer or email. For this example we will export to a word document. This is done by clicking the "Merge to New Document" button.

Mail Merge Toolbar 8

After selecting All and clicking OK, a new document will appear with each record being shown on a separate page.

Finished Doc

Advanced Alternatives

The methods described above are not the only choices you have. Using Excel you have the power of macros and VB to build more complex solutions that can integrate with other applications. Using macros you could create a control spreadsheet that launches the correct word template required.

Hopefully some of the bugs associated with Oracle desktop integration will be fixed in later versions of Word and instant client making the process more user friendly. In the meantime, we hope this guide provides you enough information to make the most out of your existing tools!



Solid Rock provides Oracle consulting, support and development services. See our Oracle Consulting page for more information.

Whitepapers

Check out our selection of articles and papers on OrgPlus, Oracle and Alesco.

OrgPlus Training

Need expert advice or training on OrgPlus?
Navigo has OrgPlus courses to suit your needs. See our list of Training Courses for more details.