![]() |
#1
|
|||
|
|||
![]()
Good morning
I have a 11 word documents (10 documents contains one paragraph ). The 11th is a main word document which contains 2 fixed paragraphs, the 3rd paragaph is populated/merged from one of the 10 word documents. the text file which is used as the mail merge file, contains typical name & address fields, and an additional field Called VariableLetter, this field contains the name of the 1 of 10 word documents which needs to be brought into the 3rd paragaph in the main document. Can anyone help me through th process? I managed to get this working in 98, but unable to get it working in 2007 Any ideas would be greatly appreciated CT |
#2
|
||||
|
||||
![]()
Hi Concertina,
This can be done by combining IF fields and INCLUDETEXT fields with your MERGEFIELDS, but you can just as easily do it without the separate files or the INCLUDETEXT fields you need to access them. Instead, you can have a series if IF fields that test the VariableLetter MERGEFIELD thus: {IF{MERGEFIELD VariableLetter}= 1 "Text for VariableLetter1"}{IF{MERGEFIELD VariableLetter}= 2 "Text for VariableLetter2"} ... {IF{MERGEFIELD VariableLetter}= 10 "Text for VariableLetter10"} Note: The field brace pairs (ie '{ }') for the above example are created in the body of the document via Ctrl-F9 (Cmd-F9 on a Mac) - you can't simply type them or copy & paste them from this message.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Hi Macropod
That has been a good help thank you. I may need to still use individual word documents, as there are going to be a lot of variable paragraphs down the track posibly 40+ So, rather than embedding the variable text, which would end up being rather cumbersome, coul you let me know how to call in the document/s Thanks for your help CT |
#4
|
||||
|
||||
![]()
Hi Concertina,
Although the variable text can be held in multiple different documents, it can just as easily be held in a single document - with each variant differentiated by a bookmark. For separate documents, you might code the INCLUDETEXT field like: {INCLUDETEXT "C:\\Users\\My Document Path\\SourceDocument{MERGEFIELD DocID}.doc"} where the source documents are named 'SourceDocument1', 'SourceDocument2, ... 'SourceDocument100' and the DocID field in your data source returns the number that corresponds with these documents. For use with a single, bookmarked, document, you might code the INCLUDETEXT field like: {INCLUDETEXT "C:\\Users\\My Document Path\\SourceDocument.doc" "BkMk{MERGEFIELD BkMkID}"} where the bookmarks in the source document are named 'BkMk1', 'BkMk2, ... 'BkMk100' and the BkMkID field in your data source returns the number that corresponds with these bookmarks. Using a single separate document has significant advantages over using separate documents, especially when it comes to maintenance.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
100 Primary Mail Merge Documents - want to add a table with fields to all of the primary documents | revans611 | Mail Merge | 3 | 09-15-2020 12:07 PM |
![]() |
Baldeagle | Mail Merge | 8 | 02-11-2013 04:40 AM |
Continue SEQ field numbering across documents | gmaxey | Word | 0 | 12-30-2012 09:16 AM |
![]() |
ilce | Mail Merge | 1 | 02-16-2012 02:33 PM |
Text field after word merge in Word 2000 | brianlb | Word | 1 | 06-29-2009 07:50 AM |