View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Multiple Records from Access Query

Hi 4charity,

You can use Word's Catalogue/Directory Mailmerge facility for this (the terminolgy depends on the Word version). To see how, check
out my Word 97-2007 Catalogue/Directory Mailmerge Tutorial at:
http://www.wopr.com/index.php?showtopic=731107
or
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
Do read the tutorial before trying to use the mailmerge document included with it.

--
Cheers
macropod
[Microsoft MVP - Word]


"4charity" wrote in message ...
I am creating a MailMerge letter using data from a query in Access. I would
like the letter to show the [InvoiceNumber] and I[nvoiceAmount] from several
records in Access for the same [Vendor], all in one letter. I am getting
multiple letters, with one record in each.

This is what I've tried, but it's not working. Any ideas?

(IF(MERGESEQ)="1" "(MERGEFIELD Vendor)" "")
(SET Vendor1(MERGEFIELD Vendor))
(IF (Vendor2)(Vendor1)"
(MERGEFIELD Vendor)

(MERGEFIELD InvoiceNumber)(MERGEFIELD AmountInvoiced)" "(MERGEFIELD
InvoiceNumber)(MERGEFIELD AmountInvoiced)""(MERGEFIELD
InvoiceNumber)(MERGEFIELD AmountInvoiced)"(MERGEFIELD
InvoiceNumber)(MERGEFIELD AmountInvoiced))(SET Vendor2(MERGEFIELD Vendor))

Note - the () are really the squiggly brackets.

As an aside: All of the vendors are the same for the records - so I think
there is some extra code in there, but I modified this from somewhere else,
and haven't figured out what to get rid of, but I don't think that matters,
since the [Vendor] info is the same for all records.