I need help with combining several records from an excel spreadsheet into one mail merge document. Specifically, I have multiple records for one customer and wish to display some of the fileds on the document. My worksheet has enough space for 8 acct #'s and corresponding data but cannot write the code so that Word will pull in all the data for each customer. I have attached my doc and data file which is setup fine for merge but cannot code for sequential data to be pulled with a unigue key field. Example: ABC Co. has 4 records, I need to display all four account#.'s and respective data for that record in respective rows.Any help would be greatly appreciated.
I was able to get the merge to go like you stated but it only pulls 1 record for each customer...so I'm wondering if a VBA UserForm may be a better fit for this situation?
Hopefully some of the members with more experience in Word will chime in here and give some suggestions.
Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
John Wright
You have to distinguish a situation in which every customer has the same fixed amount of lines and the situation that every customers has a variable number of lines.
For the fist situation see attachment 1, for the second attachment 2.
In the variable-lines case it is necessary to separate each customer in the Excel file by an empty row.
NB. the crux is in the mergefields. Look at those; using Alt-F9
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks