Display the formtemplate version on the InfoPath 2007 form

To dis­play the form ver­sion on the InfoPath 2007 form add an expres­sion box con­trol to the form. Copy and past the fol­low­ing code in the Xpath box.

substring-before(substring-after(/processing-instruction()[local-name(.) = "mso-infoPathSolution"], 'solutionVersion="'), '"')