Today while trying to open an InfoPath 2007 form I got the following error:

Form template: http://MyServerName/forms/form.xsn
InfoPath cannot open the selected form because of an error in the form's code.
The Microsoft .NET Framework 1.1 is not installed on your computer or the InfoPath primary interop assembly (PIA) is not registered. Use Add or Remove Programs in Control Panel to make sure that Microsoft .NET Framework 1.1 is installed or install it using Windows Update, then run Setup again to confirm that .NET Programmability Support is installed, or contact your system administrator.
Index refers beyond end of list.

I did not have Office 2007 PIAs (Primary Interop Assemblies) on my machine, but .NET Fx 1.1 was already there.

Anyhow, you can download Microsoft Office PIAs from the following links:

Microsoft Office XP

Microsoft Office 2003

Microsoft Office 2007

After installing Office PIAs, check that InfoPath has been installed with ".NET programmability support" selected. When you install the .NET Framework after having installed Microsoft Office this option does not get installed/configured.