Assuming you have already created an InfoPath form containing managed code. Open the InfoPath and choose Publish Form Template Chose the first option, to publish to SharePoint, and click next Enter the location of the SharePoint site you want to publish...