PDA

View Full Version : VBA script to spit mail merge based on IDs



rodloc
04-09-2014, 02:29 PM
Hi,

I have an excel sheet that have IDs and Company names on it.

I want to mail merge documents with the IDs (i have over a 1000 ids) on it but then I want to spit out a pdf that has only those IDs related to that company.

Example of Table

Company; IDs;
A; 1
A; 2
A; 3
B; 4
B; 5
C; 6
C; 7
C; 8
C; 9

What i want to do with this is export the company A Ids to a pdf, and the same for B and C.

The hard part comes because each ID is it on mail merge doc.

The question I have is there away to filter using a vba script based on company and spit out all the IDs related to this in a mail merge?

If yo have any more questions let me know.

Thanks,

Rod

macropod
04-09-2014, 03:41 PM
In that case, run a separate mailmerge for each company, using filtering or SKIPIF fields to limit the output for each run to the particular company. For the filtering, see Mailings>Edit Recipient List>Filter.