Inserting pie chart into mail merge document

V

vicki

I'm trying to get a pie chart in a mail merge document to
change with each record in the datasource (an excel
file). I've placed the merge fields for the two figures I
wish represented in the pie chart in a table. I've then
successfully added the pie chart, but always shows the
data from the first record. Is there anyway to set up the
main document so that the chart changes according to the
data for each record?
 
C

Cindy M -WordMVP-

Hi Vicki,

This is not something mail merge can do for you, without
quite a bit of help. Either manually or with VBA code. Which
version of Office do you have?
I'm trying to get a pie chart in a mail merge document to
change with each record in the datasource (an excel
file). I've placed the merge fields for the two figures I
wish represented in the pie chart in a table. I've then
successfully added the pie chart, but always shows the
data from the first record. Is there anyway to set up the
main document so that the chart changes according to the
data for each record?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 
C

Cindy M -WordMVP-

We're working in 2002 SP2 for both Word and Excel.OK. I'll outline the three (or four) basic approaches that
can be used. One of them requires macro code; the other
three are really only do-able using macros, but could be
done manually:

1. Create a separate pie chart for each record in Excel. Add
a merge field to the data source that contains the
corresponding NAME for each chart sheet. Use this merge
field in a LINK field to link the chart across for the
merge. Merge to a new document, Ctrl+A, then F9 to update
the LINK fields.

2. The approach you tried already, linking a table in Word
to an MS Graph chart. But then you have to manually "view"
each record and print that out. Executing the mail merge
won't work because the bookmark that links the table into
the chart is lost.

3. Similar to (2), but you create the charts AFTER the mail
merge.

4. In Word 2002/2003 there's a VBA-thing that would let you
create the charts on-the-fly, using either a table in the
document, or data from an outside source.

Of these, I think only (2) would be acceptable to do
manually. Whether you'd actually want to do it would depend
on how many records you'd have to cycle through.

If you're not in a hurry, I'm planning to work up (4) for a
book. I just don't know when I'll get to it (over the
weekend, I hope!)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 
V

Vicki

Thanks for the info! We have about 1300 records to merge
so I don't think we'll opt for the manual procedure. I am
interested in the 4th option, so please pass it on when
complete.
 
C

Cindy M -WordMVP-

Hi Vicki,
We have about 1300 records to merge
so I don't think we'll opt for the manual procedure. I am
interested in the 4th option, so please pass it on when
complete.
Uploaded to my website today.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun
16 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top