Display the formtemplate version on the InfoPath 2007 form

To display the form version on the InfoPath 2007 form add an expression box control to the form. Copy and past the following code in the Xpath box.

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

Determine the SharePoint version

Description WSS KB MOSS KB Version
Aug 09 CU KB973400 12.0.0.6514
June 09 CU 12.0.0.6510
April 09 CU 12.0.0.6504
SP2 KB953338 KB953334 12.0.0.6421
February CU KB961755 KB961756 12.0.0.6341
December CU KB960010 KB960011 12.0.0.6335
October Cumulative update KB957691 KB957693 12.0.0.6332
August Cumulative update KB956056 KB951297 12.0.0.6327
Infrastructure Update KB951695 KB951297 12.0.0.6318
Post SP1 Hotfix KB948945 12.0.0.6303
Post SP1 Hotfix KB941274 12.0.0.6301
Post SP1 Hotfix KB941422 12.0.0.6300
SP1 12.0.0.6219
October 2007 public update 12.0.0.6039
August 2007 hotfix 12.0.0.6036
RTM 12.0.0.4518
Beta 2 TR 12.0.0.4407
Beta 2 12.0.0.4017