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 / April 2005

Tip: Looking for answers? Try searching our database.

Can I insert a conditional page break using field codes?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Risseecm - 06 Apr 2005 19:59 GMT
I need to insert a page break if a condition is true.  For example, if the
Name field for the next record is different, print on a new page, otherwise
continue on the same page.
Graham Mayor - 07 Apr 2005 07:52 GMT
{IF {Mergefield fieldname} = "True" "insert a page break here"}

In the above construction insert a page break where indicated between the
quote marks. You will have to build this manually using CTRL+F9 for the
field boundaries. And the actual result of the mergefield when inserted
normally must be "True"

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I need to insert a page break if a condition is true.  For example,
> if the Name field for the next record is different, print on a new
> page, otherwise continue on the same page.
Risseecm - 07 Apr 2005 14:29 GMT
Thank you, Graham.  I'm guessing I don't actually type "insert a page break
here", but I don't know the code to type in for a page break.  Can you help
with this?

> {IF {Mergefield fieldname} = "True" "insert a page break here"}
>
[quoted text clipped - 6 lines]
> > if the Name field for the next record is different, print on a new
> > page, otherwise continue on the same page.
Greg - 07 Apr 2005 14:43 GMT
Risseecm,

Graham meant to be taken literally.  Remove the text -insert text break
here- from between the " " marks and with your cursor between the marks
actually insert a page break.
Risseecm - 07 Apr 2005 15:17 GMT
Thanks, Greg.  I've tried to insert a page break by pressing CTRL-ENTER and
by inserting it from the Insert menu and both methods simply move the text to
a new page rather than inserting a field code to activate when the condition
is true.  I'm using Word 2003.

> I need to insert a page break if a condition is true.  For example, if the
> Name field for the next record is different, print on a new page, otherwise
> continue on the same page.
Greg - 07 Apr 2005 15:35 GMT
RIsseecm,

Try this test.

Type   True

Select it and bookmark with the name Test

Type this text     IF Test = "True"""""

Select that and press CTRL+F9

Put your cursor between the first pair of empty speech marks and insert
a page break.  Insert>Break>Page Break

That is it.  You need to physically insert the page break in the field
code.  When you toggle the field code the break with appear in the
document as long as the condition Test is "True" if you change the
value of the condition and update the field the page break will not
appear in the document.
Risseecm - 12 Apr 2005 20:32 GMT
Greg,

I tried the test you suggested and it again simply put a page break in my
typed text rather than inserting it after evaluating the formula.  Here's my
formula:

{IF {MERGEFIELD "Supv_Name"}<>{SUPV} "New" "Same"}

{SUPV} is a stored value containing the current supervisor's name.  I'm
trying to put the page break where I have typed New so that if the data shows
a supervisor that's different from the current value, the next data set will
print on a new page.  I don't know if this matters, but I have this formula
in a table.

Any suggestions?

> RIsseecm,
>
[quoted text clipped - 16 lines]
> value of the condition and update the field the page break will not
> appear in the document.
Greg - 13 Apr 2005 11:51 GMT
Risseecm,

That is how it works.  Because the page break is in the field code,
when you toggle the field code the page break "will be there" IF the
condition is TRUE and "will not be there" IF the condition is false.
 
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.