Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-27-2017, 08:42 AM
Rushpac Rushpac is offline Merge one Excel file into multiple Word Documents Windows 7 64bit Merge one Excel file into multiple Word Documents Office 2010 64bit
Novice
Merge one Excel file into multiple Word Documents
 
Join Date: Jan 2017
Posts: 2
Rushpac is on a distinguished road
Default Merge one Excel file into multiple Word Documents


Hello,

I am trying to find a way to merge one excel spreedsheet into multiple word documents. I have to do this by state because of legal language and currently have to open each document separately and select the lines from the excel sheet. Obviously, with 50 states this can be very time consuming.

Is there a way to set it up so that the merge can look at the data in a cell, in this case, I use column AM and each state is always the two letter abbreviation, and have it open a file and merge that line of data before moving on to the next line?
Reply With Quote
  #2  
Old 01-27-2017, 02:46 PM
macropod's Avatar
macropod macropod is offline Merge one Excel file into multiple Word Documents Windows 7 64bit Merge one Excel file into multiple Word Documents Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You can do this with one letter, using IF fields to vary the output as necessary. For example, such a field might be coded as:
{IF{MERGEFIELD State}= "AZ" "Text for Arizona"}{IF{MERGEFIELD State}= "CA" "Text for California"}, etc.
or:
{IF«State»= "AZ" "Text for Arizona"}{IF«State»= "CA" "Text for California"}, etc.

An individual IF field can contain anything from a single word to multiple paragraphs, tables & images, plus additional mergefields.

An alternative approach would be to have the entire text (and any additional mergefields) for each State in separate documents and use an INCLUDETEXT field to pull in the appropriate text. For example:
{IF{MERGEFIELD State}= "AZ" {INCLUDETEXT "C:\\FilePath\\Arizona.docx"}}{IF{MERGEFIELD State}= "CA" {INCLUDETEXT "C:\\FilePath\\California.docx"}, etc.
or:
{IF«State»= "AZ" {INCLUDETEXT "C:\\FilePath\\Arizona.docx"}}{IF«State»= "CA" {INCLUDETEXT "C:\\FilePath\\California.docx"}}, etc.

Taken to extremes, the mailmerge main document might contain just the IF fields.

Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. Likewise, you can't type or copy & paste the chevrons (i.e. '« »') - they're part of the actual mergefields, which you can insert from the 'Insert Merge Field' dropdown. The spaces represented in the field construction are all required.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 01-27-2017, 02:49 PM
Rushpac Rushpac is offline Merge one Excel file into multiple Word Documents Windows 7 64bit Merge one Excel file into multiple Word Documents Office 2010 64bit
Novice
Merge one Excel file into multiple Word Documents
 
Join Date: Jan 2017
Posts: 2
Rushpac is on a distinguished road
Default

outstanding. I will give this a try. Thank you
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
search on multiple word documents Guy Roth Word 7 03-06-2017 01:31 PM
Merge one Excel file into multiple Word Documents Inputing Text from Excel sheet to multiple Word documents and Visio File Jazz43 Office 1 05-30-2013 02:08 PM
Excel 2007-How to merge multiple records into one mag Excel Programming 1 11-21-2012 12:11 AM
Merge one Excel file into multiple Word Documents Word count in multiple documents cyberpaper Word 5 07-27-2012 07:31 PM
Merge one Excel file into multiple Word Documents Word 2010 and Excel 2010 Mail merge - multiple headers robby Word 3 04-18-2012 06:37 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:53 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