The #forpage statement is different from the others, as it does not contain any order. It can begin and end the statement in different text boxes. Its value can also be used in different text boxes. ![MagicDraw 19.0 LTR SP1 > Creating a template for an OpenDocument Presentation (ODP) or Microsoft PowerPoint presentation (PPTX) > worddaveb0191f630de81137cd71fc63cc21822.png](/download/attachments/36336564/worddaveb0191f630de81137cd71fc63cc21822.png?version=1&modificationDate=1469593079363&api=v2)
Valid use of the #forpage statement in ODP To use a structured statement such as #if, #macro, or #foreach with the #forpage statement, ensure that the statement is in the same text box.
![MagicDraw 19.0 LTR SP1 > Creating a template for an OpenDocument Presentation (ODP) or Microsoft PowerPoint presentation (PPTX) > worddav70aacaede91de71fd23bf54a8d48685b.png](/download/attachments/36336564/worddav70aacaede91de71fd23bf54a8d48685b.png?version=1&modificationDate=1469593079330&api=v2) Valid use of #if and #foreach with #forpage statement Using an example from the previous figure, the generated result will be as follows: ![MagicDraw 19.0 LTR SP1 > Creating a template for an OpenDocument Presentation (ODP) or Microsoft PowerPoint presentation (PPTX) > worddav25139ea583311cb91cae05041ba335df.png (The Generated Output) The Generated Output](/download/attachments/36336564/worddav25139ea583311cb91cae05041ba335df.png?version=1&modificationDate=1469593079288&api=v2)
The end result of using #if and #foreach with #forpage statement. |