0% found this document useful (0 votes)
36 views

How To Use Merge With A Chart

This document provides instructions on how to create a mail merge document that includes charts using data from a Word table. It outlines three key steps: 1. Prepare the chart data by copying it into a Word table from another application like Excel or Access. The first column should contain record IDs and subsequent columns the chart data. Save this table in a separate document. 2. Set up the main mail merge document and insert a chart using the Insert tab. Add a bookmark named "PieChart" to the chart. 3. Insert code modules into the main document project to link the chart data table to the bookmark during the mail merge. Run the procedure to generate a new document with updated charts.

Uploaded by

stevetig
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

How To Use Merge With A Chart

This document provides instructions on how to create a mail merge document that includes charts using data from a Word table. It outlines three key steps: 1. Prepare the chart data by copying it into a Word table from another application like Excel or Access. The first column should contain record IDs and subsequent columns the chart data. Save this table in a separate document. 2. Set up the main mail merge document and insert a chart using the Insert tab. Add a bookmark named "PieChart" to the chart. 3. Insert code modules into the main document project to link the chart data table to the bookmark during the mail merge. Run the procedure to generate a new document with updated charts.

Uploaded by

stevetig
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

How to use Error! Style not defined.

Prepare the chart data The data should be in a Word table, in a Word document. If you already have such a table in another application, such as Access or Excel, you should be able to simply copy and paste it into a Word document. Take care that the records are sorted in the same order as for the mail merge, and that you have at least one row of data for each record. The first column contains the ID information relating to the merge record. The second and following columns provide the data for a pie chart. The code can also produce other kinds of charts. In this case, the second column corresponds to the x-axis labels of a column chart. The remaining columns contain the data. The first row contains the legend text for the chart. Save this document and substitute its name for the Const ChartDataDoc value. Prepare the mail merge main document Set up the main merge document as a form letter, just as you always would. Use Insert/Object to insert a Microsoft Graph Chart. Choose the type of chart you want and format it the way you wish. The macro will only change the data in the data sheet. Select the chart, then over Insert/Bookmark insert a bookmark named PieChart. If you want to use a different bookmark name, you can, just remember to change the information for the Const BookmarkName. Note that the chart and bookmark can be in a table cell or a frame if you want to have text flow around the chart. Insert a normal module and a class module into the main merge document's project and copy in the corresponding code. Go into Tools/References in the Visual Basic Editor and activate the checkbox next to Microsoft Office Graph 10.0 Object Library. (Or 11.0 if you have Office 2003) Run the procedure MergeWithChart in order to execute the merge to a new document. Pay attention to the message that is displayed at the start! The updating of the MS Graph charts in the document can take a number of seconds, and Word may appear to hang. It has not, but you do have to be patient and wait until the finishing message has been displayed.

You might also like