#1
|
|||
|
|||
Excel to Word - Many to One Mail Merge - Help!
I have exhausted too much time on this and I need help, please.
I am trying to get the data from the excel into word via mail merge. Each page on the mail merge should be for each unique ship-to. I want to each page to show all orders for that customer: Purchase Order, Product #, Product Description, Order Qty, and Order Price. I have attached the excel data and the word document table. Thanks in advance. |
#2
|
||||
|
||||
Also posted at Excel to Word - Many to One Mail Merge - Help! | Chandoo.org Excel Forums - Become Awesome in Excel
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#3
|
||||
|
||||
The simplest way would be to add a worksheet to your workbook, with that sheet containing just the customer IDs (one per customer), then use a DATABASE field in your mailmerge main document. This is described in the Microsoft Word Catalogue/Directory Mailmerge Tutorial 'Sticky' thread at the top of this page: https://www.msofficeforums.com/mail-...-tutorial.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
||||
|
||||
Another way would be to employ Merge Many To One
This entails a small modification to the merge document (attached) and a macro (below) run from the add-in to place the check boxes. The result is in the result document example (attached). Sort the data on the customer field(attached) and that is the key field and filename field. The rest of the fields are child fields.. Code:
Sub AddChecks(oDoc As Document) Dim oTable As Table Dim oRng As Range Dim i As Long, j As Long Set oTable = oDoc.Tables(1) On Error Resume Next For i = 2 To oTable.Rows.Count For j = 6 To 7 Set oRng = oTable.Cell(i, j).Range oRng.End = oRng.End - 1 oDoc.ContentControls.Add wdContentControlCheckBox, oRng Next j Next i End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
mailmerge |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mail Merge - Create seperate Mail merge pdf for each sheets of an excel file | sureshbvs | Word VBA | 1 | 03-12-2021 05:42 AM |
Excel to Word Using Mail Merge | Jacqueline | Mail Merge | 1 | 10-07-2020 04:12 AM |
Excel to Word Table via Mail Merge | ged147 | Mail Merge | 4 | 11-28-2018 02:52 AM |
Update & Unlink Specific Merge Field in Word Doc from Mail Merge - Excel VBA | RMerckling | Mail Merge | 16 | 05-17-2018 05:19 PM |
Help with switches: Word mail merge with Excel | ks_ | Mail Merge | 0 | 12-09-2009 05:09 PM |