Oracle desktop integration

Desktop Integration - Opening your query (with parameters) in Word<

By Ben Lamb, 4th February 2005

Unfortunately, if your MS Query uses parameters, you can't just run the MS Query from Word, you'll probably get the following error:

Excel however, will run the query without a problem. This means if you want to use a query that has parameters you must first run it in Excel, save it to a worksheet, and mail merge with the worksheet data.

Running the parameter query in Excel

If you are at the end of the query wizard click "Return Data to Microsoft Office Excel" and then click "Finish". Or if you are in Microsoft Query go to File->Return Data to Microsoft Office Excel

You will now be returned to Microsoft Excel and the data from your query will get loaded into the cells.

Excel - Orig

To change any parameters you are using you must refresh the data. You can do this by right clicking on any of the fields produced in Excel and choose refresh data.

Excel - Refresh

Simply enter a parameter when asked.

Excel - Parameter

And the report will change based on the parameter you entered.

Excel - New

Once Excel has the data you are after, save the Excel document and open Word

Display the Mail Merge Toolbar

The most common mail merge functions can be accessed from the Mail Merge toolbar. To add this toolbar, go to

Tools -> Letters and Mailing -> Show Mail Merge Tool Bar

This will display a Mail Merge toolbar to the screen.

Mail Merge Toolbar 1

Open the data source

To connect to the data source (excel file), you must open a data source. This is done by clicking the 'Open Data Source' button shown below.

Mail Merge Toolbar 2

Find the Excel file you saved and click open

Data Source - Excel

The "Select Table" window will appear, select the worksheet that has your query attached.

Select Table

Now that the connection is set up, go to Using Mail Merge.



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.