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. You know, that thing the mailman requires to know where a letter has to go? Yeah, that. 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 datamapper 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 “Text”, and type in @address@ in the Selector box. Give it 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: two spaces,
    • Field ZipCode

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 a certain field is 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 positionned box. Click on Insert > Positioned Box. Inside the 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 (1)

  • Fredrik

    Perhaps it would be better to use prefixes instead of suffixes? If say that last name is missing from the input in your example then there would not be a line return between the first name and the company name. If the line return after last name is instead added as a prefix to the company field (and so forth) a new line would be added if there is content to display on a line.