Jan 10 2022 12:21 AM
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 using any Word methods, and it is not in a Table]
The previous-to-last entry is
APPENDIX 14: xxxxxxxxx ................................. { PageRef APPENDIX_14 }
The page number for the above works.
The last line of the Contents is
ADDITIONAL MATERIAL ........................................ { ={ PageRef APPENDIX_14} + x }
If page number for Appendix_14 is an odd number, then x should be 2, otherwise x should be 1.
I tried using the MOD function to determine even or odd:
{ IF { MOD ( PageRef APPENDIX_14, 2) = 0 { ={ PageRef APPENDIX_14 } + 1 } { ={ PageRef APPENDIX_14 } + 2 } } }
but nothing is displayed and no syntax error. is shown. What am I missing?
Thank you.
Chris
Jan 10 2022 12:43 AM - edited Jan 10 2022 02:56 PM
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 { }
Jan 10 2022 09:29 AM
Jan 10 2022 02:30 PM
Jan 10 2022 02:57 PM