View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default using an excel pivot table as data for word mail merge

I don't think you can select a pivot table directly from the list of
"tables" within an Excel document when you connect from Word.

I suggest that you select the area of the pivot table that contains the data
you want to use (no totals rows and columns, and no other stuff above and to
the left of the table) and copy it it to a new sheet. Then see if you can
use that sheet as the data source. Because pivot tables have column names
that are generated from the data in the table they are based on, the column
names
a. may be long and contain spaces. Word may not deal with that too well,
but I suggest you look
b. will change depending on the data. That would mean that unless you
arrange your data so that the column names never change, you will have to
- change the MERGEFIELD field names in your mail merge main document
whenever the column names change and
- (probably) reconnect to the data source.

The only workaround I can think of for that is to create constant column
names (e.g. boring ones like column1, column2) and /not/ copy the ow
containing pivot-table generated names when you copy to that new sheet. But
it all depends on what you are trying to achieve.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Anne" wrote in message
...
how do i use an excel pivot table as data for a word mail merge. The data
contains various variables with a count function. eg. Count females
employed in a clerical position....count males employed in management
position....count females employed in management position
--
Anne