Back to all How-tos

Creating an address block

An Address Block is simply a group of different fields in your record that form an address. When sending letters, you’re probably already using pre-printed envelopes that have a plastic window showing the address that’s on the letter inside, which of course greatly simplifies mass mailing.

To create the address block so that it can be used and placed exactly where that window is, there is a simple trick which takes advantage of the way Text Scripts work.

In order to put this article to work, you can use this data mapping configuration and create a brand new Print Template using Connect Designer.

Creating the script

  1. First, create a new Text Script from the Scripts pane.
  2. Make the selector “Selector and Text”. Type #addressblock in the Selector box, and @address@ in the Text box. Give the script a great, witty name such as Address Block.
  3. Build the script according to the fields you have in your data. Each field needs to be on its own line, which you can add with the + on the right. Additionally, you can add extra data in the Prefix and Suffix boxes. If a field is empty, the prefix and suffix can be ignored, which means you can add line returns and static text, such as:
    • Field Gender, Suffix: one space
    • Field FirstName, Suffix: one space
    • Field LastName
    • Prefix: <br/> (which adds a line return!), Field Company
    • Prefix: <br/>, Field Address
    • Prefix: <br/>, Field City, Suffix: , (comma then space)
    • Field State, Suffix: &nbsp;&nbsp; (which adds two spaces)
    • Field ZipCode
  4. Expand Options to verify that the Insert method is HTML. With this insert method, <br/> will be interpreted as a line break and &nbsp; will appear as a space.

This creates a block that would look like this:

Gender FirstName LastName
Company
Address
City, State  ZIP

The beauty of this is simply that if the fields on a certain line are all empty, that whole line, including the <br/> line return, will be absent, so the subsequent lines go up one position.

Adding the address block to the template

Next is to position this address block in the appropriate location of the template. This is done very easily by using a positioned box. Click on Insert > Positioned Box. On the Attributes pane, in the ID box, type addressblock. Inside the positioned box, type in @address@ , and then adjust the box to the appropriate dimensions by using its properties.

Naturally, the positioning of the address block will depend on the envelope dimensions. Here is an example of what we commonly call a “9 envelope”.

While the address block is selected, you can move and resize it using the Attributes > Geometry pane:

  • Width: Enter the width in whichever unit you wish. For example, 4in for 4 inches.
  • Height: Same as above, for the height of the object. For example, 1in.
  • x-pos: Enter the horizontal distance from the left edge of the page. For example, 1in should be good.
  • y-pos: Enter the vertical distance from the top edge off the page. For example, 2.35in should be good (based on the envelope dimensions above).
Tags
Designer

Leave a Reply

Your email address will not be published. Required fields are marked *

All comments (2)

  • Bryan Huff

    How do you get the lines in the address block to stay at bottom of the box and stay there so when there are extra lines the extra lines fill up to the top? So if there are 3 address lines or 4 address lines they bottom line is the anchor point. This makes the City State Zip line always at the bottom and always in the same location