Forum Discussion
cpkaway
Jan 10, 2022Copper Contributor
Calculating a page number using Field and Function
Problem: In Word 2013, I want to add a final line to a Contents list for something that is not in the Word document, but will be added manually after printing. [The Contents list is NOT generated by ...
Jan 10, 2022
You need to use
{ IF { = MOD({ PAGEREF Appendix_14 },2) } = 1 { = { PAGEREF Appendix_14 } + 2} { = { PAGEREF Appendix_14 } + 1 } }
You must use CTRL+F9 to insert each pair of field delimiters { }
cpkaway
Jan 10, 2022Copper Contributor
Just in case someone copies the above formula, there is a missing closing brace after the + 2. The formula in the clip is correct, the brace was just omitted when transcribed. The correct version which matches the clip is:
{ IF { = MOD({ PAGEREF Appendix_14 },2) } = 1 { = { PAGEREF Appendix_14 } + 2 } { = { PAGEREF Appendix_14 } + 1 } }
I have tested it using odd and even pages, and it works perfectly. Thanks again Doug.
{ IF { = MOD({ PAGEREF Appendix_14 },2) } = 1 { = { PAGEREF Appendix_14 } + 2 } { = { PAGEREF Appendix_14 } + 1 } }
I have tested it using odd and even pages, and it works perfectly. Thanks again Doug.
- Jan 10, 2022Thanks, I have corrected the typo in my original response.