Create Word Document With InfoPath Column Values

In the past, we might have created Administrator approved InfoPath Forms (with code – behind) to achieve some custom tasks, like creating a word document with the values from InfoPath forms. But, in SharePoint Online (Office 365), we don’t have the option for an Administrator approved InfoPath form.

In this article, we will see how we can create a Word document with the values from InfoPath form. We will automate the process through SharePoint Designer workflow.

Create the InfoPath form as per your requirement, with all the needed columns (Test name, Test Number, Test Department……………. etc.).

Now, publish your InfoPath Form to the particular Form Library.

Navigate to the Office 365 site. Click on Gear button-> Site contents-> Add an App-> Select Document Library -> Give the name of your Document library (for example: Test Document lib) -> Click OK.

Create all the columns that are needed in the word document, in your Document Library.

Go to Document library and click Library Ribbon -> Library settings-> Advanced Settings -> Edit Template.

The template will get opened in MS Word. Go to Insert -> Quick Parts -> Document Property -> Select all the needed Columns (for example- Test Name, Test Number, Test Department).

Once we have added all the columns, the document will look like the below image.

Click on File -> Save as. Save the file with the same name (and template) but make sure to save in .docx format (‘Word Document’ as the Document Type).

Go back to the Document Library, Advanced Settings -> Change name from template.dotx to template.docx.

Now, to automate the document creation process, we have to create a workflow for Form library [Test Form Lib], using SharePoint designer.

Open the site in SharePoint Designer. Click on Workflows - > New -> List Workflow. Select the Form Library [Test Form Lib].

Important: Make sure to select the Platform type as SharePoint2010 Workflow.

Once the workflow is created, click on Action -> Create list Item. Then, select your Document Library [Test Doc Lib]. The “Path and Name” is a mandatory column. This would be the name of the document to be created. So, provide the name that can be identified easily. (Even specify the value from one of your columns (for example- Test Name). Then, add all the other needed columns and specify the value for them by clicking on the fx button.

Save the workflow and publish.

Now, check the word creation process by creating a new form in the Form Library. Documents will get automatically created with the values from the Form Library.

Up Next
    Ebook Download
    View all
    View all