GO to the control pannel > add/remove>
Microsoft office 2007/2010 > change
go with wizard....add or emove features
make sure infopath .NET programability is ticked
make sure VSTA is also chosen..
finish the setup nd voila the problem solved.