Hardcoding page break after while in an if-then statement

J

Jigsatics

Hi!

How do you hard-code a page break in an if-then statement? I have
multiple includetext statements on my main mail merge doc and I want to
insert a page break everytime an if statement satisfies a condition and
then load the doc file using includetext. Is there an easier way of
doing this?

thanks.
 
M

macropod

Hi,

You can do this by inserting the following field into your
IF field:
{QUOTE 12}
For example:
{IF {Condition}= "True" {QUOTE 12} "False"}

Cheers
 
P

Peter Jamieson

You just put a page break in the result text, in just the same way you might
insert one in normal text in your document. The IF field will then span two
pages but it will still work.
then load the doc file using includetext. Is there an easier way of
doing this?

Depends on what you're trying to do really.
 
J

Jigsatics

I have a follow-up question.

Now that I have included the page break in my if..then statement I hav
only one problem to fix. Since it breaks once it satisfies a condition
I end up having a blank last page. How can I fix this problem. Th
statement is somewhat like -- if the mergefield is a yes then pag
break -- after this statement i proceeded to includetext. i do this 1
times since there are 10 subsections in my questionnaire. Everythin
works except that blank last page.

Any help would be much appreciated.

thanks
 
P

Peter Jamieson

Not sure why you are inserting a break /after/ the INCLUDETEXT (which is
what it sounds like). Is it one of those situations where you could put a
break /before/ the INCLUDETEXT except that whichever INCLUDETEXT comes first
should not have a break before it? If so, maybe you could do something like

{ SET PB "N"
}{ IF condition1 is true
"{ IF { PB } = "Y" "<page break here>" "{ SET PB "Y" }" }{ INCLUDETEXT
file1 }" ""
}{ IF condition2 is true
"{ IF { PB } = "Y" "<page break here>" "{ SET PB "Y" }" }{ INCLUDETEXT
file2 }" ""
}

and so on.

If not, further explanation needed. Or maybe that will help you to a
solution anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top