Hello,
I have a template here that I am using for printing labels, it has generic data, such as:
<Title>. <First Name> <Last Name>
<Address 1>
<Address 2>
<Postal Code>
the problem I face is if my excel spreadsheet doesn't have a <Title>, it appears as..
. John Smith
123 Madeup Street
Wonderland, DisneyLand
000 000
How can I have the period removed along with the title if the spreadsheet doesn't have the Title field?
There is a period in the template as the excel file does not include the period after the Mr. or Mrs.
Thanks in advance.
Alt-F9
PHP Code:{ if {MERGEFIELD title}="" "" "{MERGEFIELD title}."}
or
{MERGEFIELD title \f ". "}
Try this.
I used the\f switch, that is after pressing Alt + F9:
which means:{MERGEFIELD title \f ". "}
If the record is not empty add the delimiter in quotes (. ) after the entry otherwise nothing is displayed.
Another helpful switch is \b which is the same idea except if the value is not empty it will add the delimiter in quotes before the entry.
More on that here under switches.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks