Create Word 2013 Documents from SharePoint 2013 list Items

imageRecently I was tasked to create a word document from a set of columns in a SharePoint List. I searched high and low and was not able to find exact directions with the most current set of applications.  This article is based on the TechNet blog here.  I wanted to update the versions of the software 

This is a fairly easy process to get working.  the hardest part was troubleshooting some security errors that popped up from Word.  This process can be a critical part of any business process especially when part of that process is to print out the documents to sign or to take to the next step.   You can also print these documents to a PDF to keep them in the computer and on SharePoint.

As with any SharePoint Project, I always look to see if SharePoint can be used to improve the efficiency of a business process by standardizing it with a workflow.  this allows the process to run the same time every time.  So this exercise we will do the following. I will be working with SharePoint 2013 and Word 2013. 

  1. Create the Document library where the document will be store and printed from if needed.
  2. Create the Document
  3. Create the list where data for the document will be housed
  4. Create the workflow to automate the process.

    Step One

    Create the Document Library, which is just a special type of list that has some special properties. 

First we need to create a new document library, in your browser:

  1. (Top right) Gear image > Add an App
  2. Select “Document Library”
  3. Name: Exam Reminder
  4. Ensure the “Document template” is set to “Word document”
  5. Create the columns in the document Library that you will use in the document. For this example we will have the following. 
  6. Name Type
    Exam Name (rename Title) Text
    Exam Date Date and Time
    Student Name Text

    Step Two

    Create the Word Document to use as a template.  IMPORTANT: We will actually be creating a Word Document. 

  7. From Document Settings Click on Advanced Setting, under the Document Template there is a location text box and a (Edit Template) Link, Click on this link to bring up the template.  .dotx
  8. First thing you should do is Save this file back to its current location as a Word Document .docx
  9. Then go back to the Advanced settings and change the .dotx to .docx image
  10. Now create the document in the Word.  Make sure you save it when complete. 
    1. Add the Text that you want to the word document and when you are ready to enter the list items, do the following.
  11. Click on the Insert Menu and then look for the Quick Parts > document Properties.  In this list will be the columns that you created from the first step.
  12. Place your cursor where you want the property to be and click on the property. 
  13. Repeat for all the properties that you need to have.  in our example we will add the student name, Date, and the Exam name.  Your inserted items will look similar to this.

This completes the creation of the document library and the associated word document. 

Step Three

Now we need a list that will store our variables that will be used in the document.  This list is where we will also create the Workflow to start the Document Creation process. 

    1. image > Add an App.
    2. Click on Custom List
    3. Name it Reminders
    4. Click Create
    5. Now add the same Fields that you did in the Document Library.

Name Type
Exam Name (rename Title) Text
Exam Date Date and Time
Student Name Text

Step Four

Our final step is to create a workflow that copies the fields from the Documents list into a new document in the Certificates document library.

I have done this process with Nintex and SharePoint designer.  For Nintex Steps, please click here.  Below are the steps with SharePoint Designer

Here is what is happening.

  • When a new item is added to the Reminders list., SharePoint will create a document in the Exam Reminder Document Library
  • Then it will copy the Exam Name, Exam Date, and Student Name from the Reminders list to the Exam Reminder Document Library.
    This will in effect create a new document in the Exam Reminder Document Library that has the fields automatically populated with the values from the Reminders List. 
  1. Open SharePoint designer and connect to your site
  2. Click on List Workflows
  3. Click on Reminders List as this is the list that will have  the workflow attached to.
  4. In step one start Typing Create List Item and hit enter
  5. Select the This List and choose the Exam Reminder List
  6. Now we are going to tell the Work flow what fields it needs to create in the Exam Reminders List and where the data will come from. 
  7. Click add  > Set the each field to get data from the current item field. 
  8. Do this for each Field. 

What we are doing here is that when an item is created in the Reminders List a document is created in the Exam Reminders document library that has the column items already embedded in the document.

Wrapping it all up. 

Now go back to your SharePoint Site and click on the Reminders list and add a new item.  Fill in the items on the form and click save.  Once you save go to the Exam Reminders list and notice that a new document has been created.  Open it and you should see the items from the Reminders list in the document. 



    Comments are closed.

    %d bloggers like this: