Use the XML Form View Web Part to embed your InfoPath Forms once you have published them to SharePoint.

Simple few steps and you have an additional web part added to your Web Part Gallery.

We'll be adding a safe control entry to the web.config file for your SharePoint site, adding the newly registered web part to your Web Part Gallery and then applying some settings to make it work.

1) Ensure you are on the right WSS IIS website folder. I run "inetmgr" from Start | Run, locate the web site, right click and open to sure.

2) Backing up your Web.Config is always recommended. Add the following safecontrol node of text into the web.config SafeControl section:

<SafeControl Assembly="Microsoft.Office.InfoPath.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.InfoPath.Server.Controls" TypeName="*" Safe="True" />

Save and close your web.config

3) Then go to your SharePoint top level site. Click "Site Actions", "Settings, "Modify All Site Content". Click on the "Web Parts" hyperlink under the Galleries heading.

4) Click "New" locate the Microsoft.Office.InfoPath.Server.Controls.XmlFormView web part type name and check the tick box and click the "Populate Gallery" button.

5) When adding a webpart to the page, the part will now be available under the "Miscellaneous" section named "XMLFormView" by default.

6) Notice that occasioanly, the web part open on the page with "The Form has been Closed" message either in the webpart or it takes over the page. Click close.

7) Click "Edit" on the XML Form View web part and "Modify Shared Web Part".

You'll find that under the "Data Binding", you'll have a XsnLocation and SaveLocation.

What I do is point the XsnLocation to the URL of the InfoPath form that I published to SharePoint. I recommend publishing your form to a seperate Form Library that the one you will allow submissions to. The URL would be http://servername/forms/expenseform.xsn.

The SaveLocation is something like http://servername/formsubmission/. These should be Form Libraries you have created.

Should you have a custom XML file not using InfoPath, use the XmlLocation to store your URL.

8) Apply and Ok and your web part is now live.

Very useful and neat webpart to capture form data.

Over 'n Out

M