#1
|
|||
|
|||
Insert variable value from Excel table into Word while using Mail Merge
Hi All,
I have a project where users will fill in an Excel file, then run a macro in the Excel file to use mail merge to create separate Word/PDF documents (1 doc/pdf per row of data in Excel) based on the data inputs. Part of the project is that multiple languages are required in the Word/PDF documents, so I have included a translation table as an extra tab in the Excel file, and I am trying to figure out how I can select the correct data from the translation table, then insert the selected data to the appropriate location in the Word document. I have attached two sample files to illustrate the point. In the Excel file, the Model and Date fields can be anything, but for the Options field only "None" or "See Page 2" can be selected. In the three "Month" fields, either "N" or the month can be selected [these selection restrictions are not in place in the attached example file]. In the Word file, there are three sections, one each for English, German, and French. The existing bold text can remain as is. For the "Options:" section, it should insert either "None" or "See Page 2", depending on what is in the Excel file. For the "Months:" section, it should insert whichever months are selected in the Excel file, separated by commas with a space. If I were doing English only, I believe this could be accomplished in a relatively simple way with a mail merge. However, for the "Options:" and "Months:" fields in the Word file, I would need the data from the translation table inserted that corresponds with the language of the section. For example, using the Model2 data from the example Excel file, the inserted text for the Options field in the German section should be "siehe Seite 2" (based on the translationtable tab), and for the French section it should be "voir page 2". For the Months field, in the German section it should be "Januar, Marsch", and in the French section it should be "Janvier, Marsc". I also included the translationlist tab, which is the same information as the translationtable tab, but formatted differently in case using the data in this format is more viable. This is posted in the Mail Merge forum as I am using Mail Merge to fill most of the non-translated text from Excel, but I am ok using VBA as needed in the Word file, Excel file, or both. Thanks in advance! Kev |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mail Merge variable table length | ajohnson | Mail Merge | 3 | 06-28-2018 06:39 AM |
Mail merge with variable content from Excel | jaggu | Mail Merge | 5 | 05-09-2017 02:00 PM |
Mail Merge using variable data in Excel | dewestone | Mail Merge | 1 | 12-20-2016 01:09 PM |
Mail Merge with variable table length MS Word 2013 | rbr | Mail Merge | 6 | 11-18-2016 07:05 AM |
Insert formatted table into word (mail merge) | manojbmsce | Mail Merge | 0 | 09-25-2008 02:25 AM |