#1
|
|||
|
|||
Mail Merge Empty Data Field
So i have a small issue. I am doing a mail merge for a letter with a number of different records all at once. The layout is as follows:
Dear <firstname> <lastname> <company name> <Address> Not all the records contain a company name. What I would like to do is when the company cell is empty in the excel merge spreadsheet for word to remove that line all together rather than giving me an error or leaving it blank. Can someone let me know if this is possible and how i can go about it. |
#2
|
||||
|
||||
1. Select your «CompanyName» field and press Shift-F9. You should see something like:
{ MEREGFIELD CompanyName }. 2. Edit the field code so you get: { MEREGFIELD CompanyName \ f ""} 3. Drag the paragraph/line break following the field into it, between the "", so you get: { MEREGFIELD CompanyName \ f "¶ "} 4. Press F9 to update the field code. You should now see: «FirstName» «LastName»¶ «CompanyName»«Address»¶ 5. Run the mailmerge. The \f switch tells Word to insert the specified character if the field isn't empty. So, if the field is empty, you don't get the paragraph/line break.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks Macropod! This totally worked
|
Tags |
mail merge date format, mail merge help, mail merge; if; fill-in |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to ignore a mail merge field if the field is blank | redzan | Mail Merge | 1 | 05-16-2013 08:34 AM |
Merge field source data field | kckay | Mail Merge | 4 | 03-25-2013 11:06 AM |
How big can a mail merge field be? | Engineer | Mail Merge | 2 | 12-11-2012 01:20 AM |
Mail Merge - If a field is black, take the data from the row below? | mikeprent | Mail Merge | 5 | 01-05-2012 04:52 AM |
Mail merge Field Code Manipulation | macjnr | Mail Merge | 0 | 09-10-2009 11:37 AM |