Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-05-2011, 11:33 AM
Medievalguy88 Medievalguy88 is offline Mail merge erases field codes Windows 7 32bit Mail merge erases field codes Office 2010 32bit
Novice
Mail merge erases field codes
 
Join Date: Jan 2011
Posts: 4
Medievalguy88 is on a distinguished road
Default Mail merge erases field codes


Hey, I'm not sure if there is a solution to this, but is there any way to keep mail merge from striping out all my codes? I have a program that runs mail merge on a document, entering information in various fields, but then I have other form codes throughout the document that need to have information added after the original mail merge runs. The problem is that when mail merge runs the first time, it strips the code out from all the fields.

For example: I work for a medical company. We enter the patient information into our program and run it. The program enters in the patient info into a .doc file that we use as a template. In the footer of this document I have a field code that puts a "Continued..." on the end of every page but the last page. When the mail merge runs and enters in the patient info in the document, it then strips out the codes and my "Continued..." becomes plain text and shows up on the last page.

Any ideas?
Reply With Quote
  #2  
Old 08-11-2011, 05:21 AM
macropod's Avatar
macropod macropod is offline Mail merge erases field codes Windows 7 64bit Mail merge erases field codes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

Hi MedievalGuy,

The stripping is cause by the fact that your 'Continued' field uses an IF statement.

Since IF fields in mailmerges get resolved and converted to the text equivalents of their true/false evaluations, you can’t use them to vary the text in the header or footer of a mailmerge document. Here’s some workarounds for displaying 'Continued Next Page' type messages on all but the last page in each Section of a mailmerge output file:
{={SECTIONPAGES}-{PAGE} \# "'Continued Next Page';;"}
to generate 'Continued Next Page', or:
{={SECTIONPAGES}-{PAGE} \# "'Continued on Page {={PAGE}+1}';;"}
to generate a 'Continued on Page #' message.

Modify/adapt to suit your needs.

Note: After merging to a new document, you may need to do a print preview before the 'Continued Next Page' message appears.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge erases field codes Mail Merge - If a field is black, take the data from the row below? mikeprent Mail Merge 5 01-05-2012 04:52 AM
Convert LISTNUM field codes to text remedios43 Word 2 07-31-2011 09:21 AM
Mail merge erases field codes Making the IF field work (not Mail Merge) Caroline Mail Merge 5 04-11-2011 04:17 PM
Mail merge erases field codes confusion with merge and field codes BluRay Mail Merge 5 03-29-2011 01:06 AM
Mail merge erases field codes Using Field Codes to Calculate 5 years from a Date vandy Word 1 09-23-2009 11:32 AM

Other Forums: Access Forums

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