Microsoft Office Tutorials and References
In Depth Information
Mail Merge: Merging with a Chart
Mail Merge: Merging with a Chart
This procedure allows you to create a chart for each mail merge record, based
on a sample chart in the main mail merge document, and demonstrates
automating MS Graph using mail merge events.
Example file:
MailMergeData,
MailMergePieChartLetter,
MailMergePieChartData,
MailMergeColChartLetter, and
MailMergeColChartData
Scenario: Just as Word's mail merge doesn't
support merging one-to-many item lists, it also
provides no way to create a chart for each record.
Wrd
There are four basic ways to accomplish this; all of these methods require a
macro if there are a substantial number of records to be merged.
1. Create a chart for each record in Excel. Add a column to the data table
and enter the name of the appropriate chart for each record. Use this
merge field in LINK field in the mail merge document.
2. Use a database field in the main merge document to create a data table
for each merge record
See http://www.knowhow.com/Guides/DatabaseInfo/DatabaseInfo.htm
for details.
Select the table and link it to an MS Graph. Preview the merge data,
one record at a time, and print each individually. Executing the merge
would remove the bookmark that links the table to the chart, resulting
in the same chart for all records.
3. Create the chart for each record chart in the mail merge result
document, after the mail merge has executed.
4. Create the charts on-the-fly, as the mail merge executes.
This macro applies the fourth method. Since it relies on the mail merge events
introduced in Word 2002, it only works with that version or later versions. The
other three methods work with all versions of Word.
View the Appendix to learn how to store this procedure
in a Standard module.
 
Search JabSto ::




Custom Search