Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a SharePoint List with about 3000 items and in the same Site I also have a Document library with custom InfoPath Template. Since there are over 3000 items in the list I dont wast to manually create a form for each item and save it.

Is there a way I can write code in C# and Generate InfoPath files based on the values in the SP list?

share|improve this question
1  
InfoPath forms stored in a document library are just xml files, tied to a content type that opens an InfoPath form to display the xml. You may want to spend some more time to get familiar with what InfoPath is and what it does. –  teylyn Mar 29 '13 at 10:46
add comment

2 Answers 2

You do not need any code for this. Make data connection (source) to the sharepoint list in your template and use controls of your choice to visualize it

share|improve this answer
add comment

If you are using SharePoint 2010, you can customize the list forms using InfoPath. The below link might be informative for you.

http://msdn.microsoft.com/en-us/library/office/gg180738(v=office.14).aspx

In the above case, your data will be stored as it is and the UI will be opened in InfoPath.

OR

First submit one item in your library using the content type, and see the xml. You can write a console application to read the items from list and generate the xml (should match exactly) for each list item and upload the same into the document library.

share|improve this answer
    
-1 The OP asked about Infopath library forms (not Sharepoint List Forms) getting data from sharepoint list as data source/connection (into Infopath library form). Your link is about customizing Sharepoint List Forms which do not have even XML data forms (as Infopath library forms do). This is completely irrelevant, redundant and misleading to the task of the question asked as well as there is no need to do any coding or applications to acomplish this –  Gennady Vanin Novosibirsk Mar 30 '13 at 7:19
    
I have provided 2 options. Please have a look at them carefully. Vikram wants to convert those 3000 list items as InfoPath based items. My solution is not at all misleading. Please let me know if you have any queries. –  BHUMI Apr 5 '13 at 5:44
    
Hi BHUMI, I am using the 2nd option your mentioned. thanks –  Vikram Apr 12 '13 at 6:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.