By: Kathryn Bartlett
The daunting scenario is this: you have an InfoPath form you have published to a library in SharePoint. You’ve created thousands upon thousands of items in this library and the desired information from the InfoPath form has populated columns in the library. Next, you make changes to this InfoPath form and republish it to the same library. All the data that was populated for the existing forms have now disappeared! When you relink a form manually, the data reappears! So now you’re facing manually going through all thousands of forms in the library, relinking the document. Scary thought, huh?
I happened to find a very helpful and free solution off of codeplex that will handle this situation for us. It can be downloaded here: http://sprelinkdocuments.codeplex.com/. This is an .exe that will prompt you for a Site URL and a List GUID.

To get these fields, navigate to the form library, click the drop-down View menu, and select “Modify this View”.

Now, copy the url from the browser, and paste it in a word document or notepad to be viewed more easily. It will be ugly, as shown in the example url below:
http://ktsp2007dev/Docs/_layouts/ViewEdit.aspx?List=%7BB8F5CFD2%2DC2CA%2D4C5F%2DB4E6%2DEE50E542D71C%7D&View=%7B307D5F37%2DAC25%2D4B01%2DA56E%2D99E9648D2CDD%7D&Source=http%253A%252F%252Fktsp2007dev%252FDocs%252FForms%252FForms%252FAllItems%252Easpx
The Site URL is the text highlighted in green above. Copy and paste this text into the Site GUID field of the .exe.
The List GUID is all the text between “List=” and “&View” as highlighted in yellow above. Currently this text is encoded for HTML, so we have to go to the following url to decode it: http://meyerweb.com/eric/tools/dencoder/

Copy and paste the List GUID into the text box above and click “Decode”. It will return the List GUID between two curly braces, as shown here:

Copy all the text between the curly braces, and enter it into the List GUID field of the .exe.
Now click “Relink” and after a few minutes it should say either “Success!!” or “Failure”.
By: Kathryn Bartlett