Answered by:
Mailmerge and IF conditions

Question
-
Hi
Im trying to setup a template document that has 2 pages. The first page has a certificate on it with the mail merge contact details. The second page will be an external document which is relevant to the contact. I setup some basic text files to be called relevant to the course fields value. i.e if course = "welding" then import welding.txt
Is this possible or am i way off track?
Any help appreciated
Si
Thursday, August 4, 2011 9:02 AM
Answers
-
Yes this is possible. First insert a link to one of the txt files (Insert|Object|Text from file, click the little arrow on the Insert button in the file dialog and select "Insert as link". After this is done and you press Alt-F9, you see something like this :
{INCLUDETEXT "C:\\TEMP\\sample.txt" \c AnsiText}
Insert your mergefield "course" inside this INCLUDETEXT field - create it outside first and move it there:
{INCLUDETEXT "C:\\TEMP\\{MERGEFIELD Course}.txt" \c AnsiText}
Press Alt-F9 to return, F9 to refresh.
The preview function doesn't update the included text, but if you actually do the mail merge (new document or print), the files are inserted.
- Marked as answer by David Wolters Thursday, August 4, 2011 2:14 PM
Thursday, August 4, 2011 9:26 AM
All replies
-
Yes this is possible. First insert a link to one of the txt files (Insert|Object|Text from file, click the little arrow on the Insert button in the file dialog and select "Insert as link". After this is done and you press Alt-F9, you see something like this :
{INCLUDETEXT "C:\\TEMP\\sample.txt" \c AnsiText}
Insert your mergefield "course" inside this INCLUDETEXT field - create it outside first and move it there:
{INCLUDETEXT "C:\\TEMP\\{MERGEFIELD Course}.txt" \c AnsiText}
Press Alt-F9 to return, F9 to refresh.
The preview function doesn't update the included text, but if you actually do the mail merge (new document or print), the files are inserted.
- Marked as answer by David Wolters Thursday, August 4, 2011 2:14 PM
Thursday, August 4, 2011 9:26 AM -
That works brilliantly. Thankyou so much. :-)
Is there anyway when viewing the records that the imported document changes in real time? I know it works when you send it to the printer but it would be nice to see if everything was working.
Thanks
Si
Thursday, August 4, 2011 10:27 AM -
The automatic refresh would require some programming. It would be a good idea for the next Word version ...
You can always press F9 to see the right contents.Thursday, August 4, 2011 10:45 AM -
Thanks for your help, your a star
Si
Thursday, August 4, 2011 10:46 AM