Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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. |
#2
![]() |
|||
|
|||
![]()
{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" -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Risseecm wrote: 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. |
#3
![]() |
|||
|
|||
![]()
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? "Graham Mayor" wrote: {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" -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Risseecm wrote: 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. |
#4
![]() |
|||
|
|||
![]()
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. |
#5
![]() |
|||
|
|||
![]()
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. "Risseecm" wrote: 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. |
#6
![]() |
|||
|
|||
![]()
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. InsertBreakPage 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. |
#7
![]() |
|||
|
|||
![]()
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? "Greg" wrote: 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. InsertBreakPage 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. |
#8
![]() |
|||
|
|||
![]()
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. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
insert "Section Break-Next Page" but get "Section Break (Odd Page. | Page Layout | |||
How do I insert a page break before a table without inserting an . | Tables | |||
Odd page section break | Page Layout | |||
FIrst page footers | Microsoft Word Help | |||
Finding/removing an "obascure" manual page break | Tables |