IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#53148 - 03/04/16 11:08 AM Bold type within if/then statement
filewizard25 Offline
OL Newbie

Registered: 10/29/13
Posts: 3
Loc: Nebraska
Hi everyone! I'm new to this forum, NOT new to PrintShop Mail. I didn't see this question answered so I'm sorry if this is a repeat question.
I have a client that wants two different paragraphs of type to switch between depending on a field in their excel file. Within those paragraphs though, they want some type bold. I haven't ever found a way to format type within the window where you write the code. Is there anyway to do this that I'm missing?

Thank you so much in advance!

Top
#53155 - 03/05/16 04:06 AM Re: Bold type within if/then statement [Re: filewizard25]
Sander vd Berg Offline
OL Expert

Registered: 06/10/08
Posts: 207
Loc: Objectif Lune NL
This is a fun question..

Most people on this forum will tell you that you need to create two different overlapping text boxes, one with a bold variant of the text and the other with a plain variant, and then create scripts that will clear the content of either box depending on a field value.

But there is also a much less roundabout undocumented way to accomplish this that relies on the fact that PSM recognizes RTF tags:

Code:
IF (MOD(COUNTER(), 2) = 1, "{\rtf1\b This is bold\b0}", "This is not bold")

Of course the test part of this condition is just an example, you can base it on a field value instead. The \b tag switches to bold (it needs to be followed by a space) and \b0 resets to non-bold.

Just be aware that you're not allowed to mix RTF content and plain text content in the result of a single variable, so if you want to do that you'll need to separate the text out to different variables.

Top