Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / November 2003

Tip: Looking for answers? Try searching our database.

Hardcoding page break after while in an if-then statement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jigsatics - 07 Nov 2003 20:35 GMT
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.
macropod - 08 Nov 2003 04:13 GMT
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
>-----Original Message-----
>Hi!
[quoted text clipped - 12 lines]
>
>.
Peter Jamieson - 08 Nov 2003 11:22 GMT
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.

--
Peter Jamieson
MS Word MVP

> Hi!
>
[quoted text clipped - 9 lines]
> ~~ Message posted from http://www.WordForums.com/
> ~~ View and post usenet messages directly from http://www.WordForums.com/
Jigsatics - 10 Nov 2003 18:52 GMT
It worked!

Thanks Peter!
Jigsatics - 12 Nov 2003 21:17 GMT
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
Peter Jamieson - 12 Nov 2003 23:17 GMT
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.

--
Peter Jamieson
MS Word MVP

> I have a follow-up question.
>
[quoted text clipped - 13 lines]
> ~~ Message posted from http://www.WordForums.com/
> ~~ View and post usenet messages directly from http://www.WordForums.com/
Jigsatics - 13 Nov 2003 18:44 GMT
Thanks!

I was able to fix the problem.

Til' next time...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.