Documentation/How Tos/Suppressing Blank Address2 Fields in Mail Merge Documents
Here is the situation we are addressing. Sometimes your addresses have two lines for the address part, sometimes they do not.
Bob Jones | Marion Silverman |
101 Main | 888 105th Ave |
Suite 55 | Broomfield, CO 82211 |
Boulder, CO 80022 |
But you have to put in the <Address2> field for everybody, since it is a mail merge. The setup has to be the same.
<Firstname> <Lastname>
<Address1>
<Address2>
<City>, <State>, <Zip>
But with this approach, your addresses look like this.
Bob Jones | Marion Silverman |
101 Main | 888 105th Ave |
Suite 55 | |
Boulder, CO 80022 | Broomfield, CO 82211 |
How do you suppress that second Address2 line and the corresponding carriage return if there is no content for a particular record, for that Addres2 field?
Here is the guide, using an example of labels.
- Create the labels for mail merge as usual. File > New > Labels, select your database and tables, insert the fields, etc.(See Creating Mail Merge Documents From Text/CSV or Spreadsheets)
- Choose the Synchronize Contents checkbox.
- Click New Document. The labels will appear.
- Turn on nonprinting characters if they are not on already, by choosing View > Nonprinting Characters.
- Select the first soft return, shown selected.
- Press Return or Enter to replace it with a hard return.
- Repeat, to make them all hard returns.
- Click Synchronize Labels to update the other labels to be the same.
- Select the Address2 field.
- Choose Insert > Section.
- Name the new section Suppress. Select the Hide checkbox and type the following condition. databasename.tablename.fieldname EQ "" The names are case sensitive and the last part is two double quotes together. Example: databasename = DatabaseWithTwoAddresslines tablename = Table1 fieldname = Address2
- Click Insert.
- Click Synchronize Labels.
- Now preview the data or print the data.
If you need to change the section, select it in the first address and choose Format > Section. Select the one named Suppress for the master label and make changes, then click OK. Click Synchronize labels again.
This How To comes from Solveig Haugland's Blog
Content on this page is licensed under the Public Documentation License (PDL). |
nl:NL/Documentation/How_Tos/Suppressing_Blank_Address2_Fields_in_Mail_Merge_Documents