Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-06-2023, 12:33 PM
kev020202 kev020202 is offline Insert variable value from Excel table into Word while using Mail Merge Windows 11 Insert variable value from Excel table into Word while using Mail Merge Office 2021
Novice
Insert variable value from Excel table into Word while using Mail Merge
 
Join Date: Sep 2023
Posts: 1
kev020202 is on a distinguished road
Default 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
Attached Files
File Type: docx main file.docx (13.8 KB, 6 views)
File Type: xlsx databasefile.xlsx (12.6 KB, 5 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert variable value from Excel table into Word while using Mail Merge Mail Merge variable table length ajohnson Mail Merge 3 06-28-2018 06:39 AM
Insert variable value from Excel table into Word while using Mail Merge Mail merge with variable content from Excel jaggu Mail Merge 5 05-09-2017 02:00 PM
Insert variable value from Excel table into Word while using Mail Merge Mail Merge using variable data in Excel dewestone Mail Merge 1 12-20-2016 01:09 PM
Insert variable value from Excel table into Word while using Mail Merge 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

Other Forums: Access Forums

All times are GMT -7. The time now is 07:47 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft