Automatically create Word documents which include list fields

Creating Word documents containing List fields


I haven’t seen much information on the web regarding how to automatically create Word documents in SharePoint and how to pass list item fields directly into a document.


It’s fairly straightforward to get this working (certainly no code is required, just SharePoint designer) and the technique could be used to automate all manner of business processes.  For example, you could create an ASPX page containing drop down fields and calculated fields that automatically creates a quotation document or you could have a form that captures all the details for a job vacancy that would create a standard looking job advert.


In this exercise I will keep things simple and create an application that creates a certificate with an exam name, user name and pass mark passed into the Word documents from a list item.  This would make a nice addition to the Quiz Web Application exam.  This example requires Word 2007.

Here is an example of the created document with fields (the name, the exam title and mark – shown below in bold, being variables stored in a SharePoint list.


The example has the following components:

·         A document library which has a Word document associated which is used as the basis for all new documents

·         A list containing the fields that we want to pass into a new document

·         A workflow which creates a new Word document and copies the fields from the list into the document


Creating the document library


A document library is really just a special type of list.  There are some differences in functionality but many of the features remain the same.

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

·         (Top right) Site Actions > Create

·         Select “Document Library”

·         Name:  Certificates

·         Ensure the “Document template” is set to “Word document”

Next we want to add some columns to our document library for our variables to be added to


1.       Click on the “Settings” button in the list view

2.       Click on “Document library settings”

3.       Click on “Create Column

Add the following columns:




Single line of text




By default, the Title column has already been created in the list so we will use that to store our Exam title field.  There are some other columns in that are created for a document library that we will not need to use.

Creating a Word document to use as a template


Next we want to create our word document which will act as a template for all newly created documents in this library.  I am a little reticent to use the word template as we will actually just create a normal document (DOT / DOTX) rather than a Word template (DOT / DOTX).

In the settings screen of the document library:

1.       Click “Advanced Settings”

2.       Click “(Edit Template”)

Word will open the file which is located in the forms library of your document library.

3.        Save the file as a “Word document” (click okay if you are asked to confirm)

This saves the template document from Word 97-2003 format (compatibility mode) to Word 2007 format which is a DOTX file.  This allows use the document property field.  Note we are also saving the file as DOCX and not DOTX (which is a word template file and will not work).

We need to associate our document library with the new file, to do this:

1.       Document library > List settings > Advanced settings

2.       Change the template name to “template.docx”

3.       OK

Now we are ready to create the template for our certificate, go back into the Document Library > List Settings > Advanced settings and click on the Edit Template link.

You can create a nice looking document leaving space for where our list fields will go.  When you are ready to insert our fields, do the following:

1.       From the main menu select “Insert”

2.       Click “Quick Parts” > “Document Properties”

3.       You will see a list of the document properties including the columns we added (Score and YourName)



You can select each of our fields and place them in our document – YourName, Score and Title are the three fields we will insert.

4.        Insert each of the fields into your document, they will display like this:


Here is an example of the basic layout:

And here is something a little fancier.


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

Creating a list to store our fields


We need to create a list to store our values that will be inserted into the document template.

As you can imagine, this is very straightforward:

·         Site Actions > Create

·         Custom List

·         Name:  Documents

·         Click Create

Then add our two fields into (Title will already exist)

Add the following fields to the Documents list Add the following columns:




Single line of text




You will notice this is exactly the same as what we did for the document library fields.  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.


Writing our workflow to create new documents in the certificates library


We are going to create a simple workflow that does the following

·         When a new item is added to the Documents list create a new Item in the Certificates library

·         Copy the title, YourName and Score fields from the Documents item into the Certificates item

This will in effect create a new document in the Certificates library that has the fields automatically populated with the values from our Documents list.  Here is how:

1.        Open SharePoint designer and connect to your site

2.       File | New | Workflow




  • Give the name as “Make a new certificate”

  • Attach “Documents” list to this workflow.

  • Select “Automatically start this workflow when a new item is created”

We are saying here, each time a new item is added to the Documents list then run the workflow.


3.       Click “Next”

4.       Click “Actions” > “Create List Item”



5.       Click on the “this list” link

6.       On the list selector choose “Certificates”

7.       Click on the “Name (for use in forms) …” entry and click “Modify”

8.       In the value box, click the “Fx” button



9.        Keep the source as “Current Item” and change the field to “YourName”

10.   Click OK, OK


The above steps mean that when a item is added to the list Document  then a new document will be created in the Certificates document library and the name of the item will be set to YourName feild.

If more than one item is created with the same name then a unique identifier will be automatically added to the title.

Next we need to add our three fields to the Create List Item action.  To do this:

1.        Click the “Add” button

2.       Set this field:  Score

3.       To this value:  Click the “Fx” button

4.       Source:  Current Item

5.       Field:  YourName

Do the same for the Title and YourName values.  Your completed List Item dialogue should look like this:


You can now click “OK” and you will see SharePoint designer create the new Workflow and assign it to your list.

We are now all ready to test our new solution!

Putting it all together – testing our solution


Go back to our website and select the “Documents” list and click “New” and complete the fields and click “OK”


Back in the list of items in the Documents list you will notice a new column “Make a new Certificate” has appeared.  This column shows the status of the workflow that we created. 


Currently it will be showing “In Progress” whilst the workflow kicks and begins to run (creating the new word document in the Certificates library).  Wait for a few seconds and then refresh the page (F5).  You should see the status has changed to “Completed”


Finally, switch to the Certificates document library.  You will see our new document has been created.  When you open the document you will see that values that we passed are now contained in the Word document.



Comments (90)

  1. Anonymous says:


    I must say that your information is very useful and to the point, good work.

    I am facing challenges while starting of workflow as per your described steps, when I have selected workflow start options as “Item Created” or “Item Changed”, then also my workflow didn’t start on any steps, then I have to start my workflow manually, for generating word 2007 file, do I miss any points? I didn’t understand what’s wrong in one simple steps of designer workflow.

    Is it possible to achieve same functionality with word 2003 documents? Because I have observed that in word 2003, we don’t have capability to add document properties fields.

    Thank you very much for your help.


    Sanket Shah

  2. Anonymous says:

    Anyone link this to the fab40 Employee Training template?

    The two lists are the courses and registrations lists within the Employee Training Template that is part of the Fab40 for SP2007.  The OOTB design is that upon registering for a course an entry gets created in the "hidden" Registration list with a lookup to the to the Courses list via the Course ID field.  What I am trying to do is also copy the following fields for that registration into the Registrations list:

    • Location  

    • Course Title  

    • Course Completion Date

    So I can then drive certificates off that list.

    Thanks in advance.

  3. Anonymous says:

    Hi @ Nancydeb,

    I faced the same requirement as you, my client doesnt have 2007 . So i come up with an idea to again convert the document as webpage (You can see the below link how to do it.) It solved my purpose.

  4. Anonymous says:

    My list has a "Link to Picture/image" , requirment is that the image should also be part of the document created. Will it be possible? Any help would be highly appreciated.

    Thanks in advance.

  5. Anonymous says:

    Another question. Not everyone in our office has Office 2007. Can I set up a workflow to automate the saving of my new docx created to a doc?

  6. Anonymous says:

    This workflow works great. This is kinda technical but is it possible to allow the workflow to submit by someone with access via a link or button?

    In other works if someone isn’t logged in and they try to submit they get an error message. So I’m trying to get it that when anyone whether logged in or not can go to the list and fill in a new entry and submit without receiving an error. And later when somone who has access can pull up the entry or entries and submit them to the wrokflow if they choose.

    Any feedback would be helpful, thank you.


  7. Anonymous says:

    This great.

    Is there a way to do an iteration over many list items to create one document that contains MANY Name, Title, Score records?

    Thanks & Ciao


  8. brenclarke says:

    Hi Vincenzo – take a look at for a way of achiving this.

  9. Anonymous says:


    this tutorial works very fine, we have just one Problem. I used a rich text field with formated text an in the final Word document all html tags like  <strong>Stammdaten </strong> are shown. Are there any way to copy the field with the correct formatting and without the tags?

    Thanks for any ideas


  10. Anonymous says:

    Great Article, even after 3 1/2 years!

    I used this article to setup Document Generation in SharePoint 2010 and for the most part everyhting was the same. I had some difficulty at first (associating) the template to the Doc. Lib. I ended up deleting the D.L. and creating a new one. This will be a BIG time saver for one of our departments that generates LOTS of correspondence.

  11. Anonymous says:

    Great post, good information.  Of course, it’s never enough… Ughhh!  I have a question / issue related to the above.  

    I have created a workflow similar to yours, and I was wanting to have some fields remain optional.  

    i.e. First Name, Middle Initial, Last Name

    If the user does not have middle initial, and the field is left blank, the final document has the vacant field printing or at least showing up…

    Do you have a solution for this?  


  12. Anonymous says:

    hi all.

    Thank you so much for creating this tutorial. its great! but, actually i got the problem.

    i already followed the steps, but in the end when i try to open the document, the values that i already keyin are not contained in the word document. the values are saved to the column/field only.

    anyone can help me? pleaseeeeee

  13. Anonymous says:

    Hi, thanks for the great tutorial.

    I’m having a problem getting rid of the formatting info from a multiple-line rich text column using this workflow method. I’ve managed to add a rich text capable column to the document library, & tested that it accepts rich text with formatting but when the workflow transfers the rich text from the source list to the document library it fills it in as plain text. When you fill it in manually from the document library it retains it’s formatting. Any ideas?

  14. Anonymous says:

    How can i do this with vs workflow inside sharepoint hosted app?

  15. brenclarke says:

    Hi @Nancydeb – as far as I know this can only be achived in Office 2007 onwards.  Sorry about that.

  16. Suresh C says:

    Thanks for this blog post. This is really a cool idea to create Word reports from List data.

  17. Anonymous says:

    This is a very usuful article.

    sanketshah_18, try the instructions in the following link to see if it solves your problem;


  18. Anonymous says:

    Here is good example on how to update Word document in the workflow using SharePoint designer:…/Example-Invoices-PDF-Conversion.aspx

  19. Anonymous says:

    Thank buddy! That was a great step by step guide which saved my day! Cheers!

  20. brenclarke says:

    Thanks Terry – you are right, the file cannot be a template (DOT) file.  I’ve updated the post which hopefully makes this clear.  I’d be interested in the kind of furture posts you would like to see?

  21. Anonymous says:

    How about something similar…

    what if I want to print a book from a document library.  think of the Employee Manual, autocreated from a doc library.

    I can do it with code, but not sure how far we can take Workflows.  I also figure we need to do some extra magic in Word like creating a TOC on the fly.

    Is this an OBA? Any suggestions?

  22. Great post.quite helpfull

  23. Anonymous says:


    Thank you for the interesting article.  I had a similar requirement where I would need to autopopulate "Customer Name" and "address" from a sharepoint list into a word document.  Followed the details above, but have a formatting issue.

    I need to autopopulate two fields

    Customer Name


    Firstly there  is a space between Customer Name and Address which should not happen.  

    Secondly the address part of the text gets greyed out.  Would want it in black normal font.  

    If you could help me solve these issues, it would really helpful.  Just concerned about formatting

  24. Anonymous says:

    Great post, thank you. Does this work if one of the columns in your list is a ‘look up’ column type, that is grabbing items from another list in your site.

  25. Anonymous says:

    Would love to know if anyone got this working in SharePoint 2013, I keep getting an error that says “Sorry, Word Online ran into a problem opening this document. To view this document please open it in Microsoft Word.” I do this and it is blank

  26. Anonymous says:

    Thank you so much for creating this it helped me out a ton! I found what it was

    2.       Change the template name to “template.dotx”

    I had to change it to “template.docx” and the it worked. Thanks again!

  27. Anonymous says:

    Hello all,

    Nancydeb: AFAIK you still can save documents to DOCX format – clients just need to install Microsoft Office Compatibility Pack – . I think word 2003 with this addon should be able to read generated DOCX files.

    Another thing about "look up" column. We have created a solution to generate docs using a little bit different approach. Free version have feature to add up to 3 lookup items (commercial have no this limitation). If you are interested – you can try it here:

  28. Piotr1 says:

    Hello, nice tutorial.

    I've hit on a snag though – I can create new documents by hand with no problems, but when I try to do it in a workflow, the resulting document will not open in Word, giving an error message: "The file whatever.docx cannot be opened because there are problems with the contents. – No error detail available." I was wondering if anyone else got the same error and maybe found a way around it ?


  29. MrVirtual says:

    Hello, I've got the same problem as Piotr. "The file whatever.docx cannot be opened because there are problems with the contents. – No error detail available". If the Library  is set to compatibility 2k3, the file docx are still generated and can be opened but the fields are obviously blank. A solution? Regards

  30. dkemp says:

    I think i have a similar problem to both Piotr and MRVirtual.

    When the document is created it doesn't create a Word file but an xml file.

    Do you know why this might be please?

  31. dkemp says:

    Apologies, figured it out. I was accidentally setting the name to the name of the infopath form which had an xml extention

  32. kshett says:

    Reply to Britt05

    I had this problem too, and it took me a long time to figure it out!

    To remove the rich text html tags from the SharePoint generated word document, you need to make all multiple line columns in the source list 'Plain Text'

    1. Access the list settings of your source list (in this case 'documents list')

    2. Click on the columns that are multiple lines of text.

    3. Under "Additional Column Settings" select the 'plain text' check box. Click Ok, then ok again when prompted.

    NOTE: This will remove html rich text formatting from the whole column. This means that when the column information is extracted into the word document, there are no html tags.

  33. reyayanami says:

    I'm using this solution to complete a word document with values from sharepoint lookup columns. the thing is instead of the actual value that i select frim the dropdown in the DIP panel, in the docuemnt I get the ID number of the ITEM. Does anyone know what could be wrong with my template or my loook up columns??

    ANy help wuold be much appreciated

  34. Paul Beck says:

    Hi Reyayanami,

    "Use SharePoint Manager 2007 (SPM) to browse to the SharePoint list and examine the SchemaXml property of that lookup field. Notice the List="f7d54276-e103-4b84-8a1e-fe31515325b4" attribute in this xml" – source…/problem-with-document-information-panel.html

  35. koncis says:

    Great article!!! I also have to mention that I got working this by setting docx in library settings as template format!


  36. Matt says:

    Has anyone been able to do this in SP 2010?

  37. mswin says:


    Great article!!!

    I am getting the beloww error in the workflow, which I am attaching to list item creation:

    Unknown Server Error: d

    Any thoughts on this?

    Thanks In Advance.

  38. Tanmayee says:

    Thanks you so so much, It was very helpful

  39. how to build a list says:

    i am a blogger everyday i browse different types of articles to get lots of new tips while i was browsing,i found ur blog your article is really awesome.Thanks for sharing such nice article here.i also want to share valuable how to build a list tips.

  40. Franzis says:

    @Matt: Yes, I did it in SP 2010, it works the same way as described above only the user dialogues lock a bit different. However I am still facing one problem: Creating a new document with the SP-liste metadata runs pretty smooth but when I try to update the data it will overwrite all meta-data in the document with empty values….even though I selected to replace files in case they have the same file-name. Anybody an idea on this ?

  41. RAOUL says:

    Works like a charm – the only problem I have, is that I would like in word to have formatted fields – lets say I create automatically an invoice. Regardless what the format in the sharepoint list is, the number 1'000.00 will only be displayed as 1000 in the so generated word file. I tried all the different functions and formatting in the sharepoint lists, but somehow word does its own formatting.

  42. George Legere says:

    I have tried the steps Using word 2010 and Sharepoint 2010 and when I re-refesh after In Progress I get Error Occurred. any ideas why?

  43. Fredrik says:


    This works really fine.

    Is there a way to have the word document updated with new data if you change an item in the list?

    And the other way around update the list if the document changes?


  44. Ken says:

    Has anyone found a solution for keeping the rich text souce column formatting and inserting to the template with the format retaind and no tags?

  45. Jo says:


    I got through the setup of the list and the library.   When trying to setup the Workflow I am not seeing any of the same screens.  I have SharePoint 2010.  Do you have instructions on how to set this up in SharePoint 2010?  Thanks, Jo.

  46. Jo says:

    Hi – I have SharePoint Designer 2010.  Do you have the Workflow instructions for it?  Thanks, Jo

  47. Donald McMahon says:

    Hello.  Thank you for this awesome walk-through!  I was able to get the functionality to work, however, when the document is created, one of the fields appends the HTML tags, but none of the others do.  is there a quick fix, or have you encountered this before?


  48. Carleen says:

    Awesome feature and a TOTAL time-saver for me!!  I have one question though, is there a way to continue to update the same document rather than generating a brand new document for every change to the list item?  


  49. JohnW says:

    Great work and very useful. We built a web part to overcome this issue – – you're welcome to try on our demo site or a free 15 day evaluation trial on your own site.



  50. sgislain says:

    Great post, works very well in top level sites, but i tryed it in a workspace & it doesn't work. I created a workspace by adding a calendar item & clicking the option "workspace" & i followed your procedure, doesn't work !!! HELP !!!

  51. Zaid says:


    I followed the instructions and it worked for SP2010 but did not work for SP 2013

    please help


  52. Michelle says:

    This helped a ton! Now I'm trying to link a checklist to the options from another checklist. Is there a way to access the options in a checklist? Essentially I'm trying to nest a checklist within another. Thanks

  53. MikeFin says:

    Great post.  Does anyone know how to prevent empty fileds frmo displaying the [fieldname] on document.  I wish to have empty fields not show anything.  Thank You

  54. RichardS says:

    This is exactly what we needed. Thanks for sharing.

    Question: Can we do this for a different file format (i.e. powerpoint etc)?

    Thanks again,

  55. Richardsswaroop says:

    This is exactly what we needed. Thanks for sharing.

    Question: Can we do this for a different file format (i.e. powerpoint etc)?

    Thanks again,

  56. Imad El-Qasem says:

    for SharePoint 2013, the generated document will be empty and not using the specified template.

    Please share if this worked on SharePoint 2013

  57. Jacob says:

    Do document properties not sync up with sharepoint properties in Record Centers? The word document properties are updated through the quick parts and appear in the word properties, but the SharePoint values remain blank. I have tried and successfully repeated
    this process on other sites in 2010 and 2013, so the only difference I can think of is the record center part. Please advise 🙂

  58. Elias says:

    Excellent write up, but it does not appear to work with SP2013 (many including myself are receiving a blank word document). Is there a reason for this?

  59. Chandrakanth says:

    Very much helpful……….Thanks

  60. Robin Majumdar says:

    Very helpful and well written article – I appreciate it, it is timely as I’m trying to leverage our (recently) deployed Office 2010 to finally take more advantage of our SharePoint environment… notably to generate Word documents (i.e. purchase orders) based on list or document library data.

  61. xxherbalistxx says:

    This doesn’t work in SharePoint Online 2013 and SharePoint Designer 2013. Can anyone please advise if somebody have managed to do it successfully? It would be helpful if you can share it in this thread.

  62. mike says:

    Also tried this and does not work in SP2013

  63. Mike Carey says:

    The solution to the empty resulting Word document in 2013 is to create the workflow as a 2010 workflow (not a 2013 workflow).

  64. Please someone can do it work in SP online 2013???

  65. Juan says:

    Hey Guys

    My Problem is It does not want to save and file in the library. but it has the extension .000 so it is not a word document.

    Any Ideas why it would be doing this?

  66. Juan says:

    Sorry I mean it saves a file but it has the extension .000

  67. Juan says:

    Hey Guys I got it to Work.

    Let me know if you need any help. data is not blank and saves as word document.

    add me on linked in. Juan de Roock

  68. Fatima says:

    This is fantastic information. Thank you so much.

  69. kit says:

    I try to create a empty document, but when I open it an "Can’t open the document because its a problem with the content". I do this with SharePont 2010 and works fine. But with SP2013 don’t. PLEASE HELP!

    I try with .docx, .dotx documents, with workflow 2010 and still not working.
    If i open the document clicking "new document" everything works fine

  70. Andres Ortiz says:

    Hi please you have any solution for SharePoint selection columns? This type of columns doesn’t show in Quick Parts option in Word. Thanks

  71. Agne says:

    Have you tried this solution? I am working with it everyday and dont have any problems. Now i started to use it for reports about sales and have that information in different sites of sharepoint. Really recommend
    you to try this its OWESOME!!!

  72. Marian says:

    Does anyone have a solution for SP2013? It works with SP2010…but I would like to find a sustainable solution for SP2013. Thanks!

  73. alex says:

    Thanks for the post, I also found a similar post for SharePoint pulling it from a list vs fields in the document list.

  74. Amy Winter says:

    Thank you!

  75. Polina says:

    Thank you, I found this extremely useful!
    Follow up question. I’d like to add Consolidated Comments from the workflow to the Word document. It works, but as an outcome I have my comments with html tags. Do you know how to get only text without them?
    Thank you in advance,

  76. Zigo says:

    Hi, this is quite a neat solution, but I wonder if someone could help with an issue I have. If I amend/update an entry in my original list, it overwrites the document but with the original template, not with a document with the updated fields. For example,
    the first time I add an entry, the document created shows ‘John Smith’ in place of the [Name]. But if I then update the original entry, say I change ‘John Smith’ to ‘Jon Smit’, then the output goes back to [Name]. Has anyone encountered that issue? Thanks

  77. Clay Shannon says:

    Should this:
    "I am a little reticent to use the word template as we will actually just create a normal document (DOT / DOTX) rather than a Word template (DOT / DOTX)."

    be this instead:
    "I am a little reticent to use the word template as we will actually just create a normal document (DOC / DOCX) rather than a Word template (DOT / DOTX)."

  78. SharePoint Administration Training Online says:

    Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.">SharePoint Administration Training Online

  79. Meg Wellman says:

    Is it possible to create a word doc using this workflow, but pull fields from multiple records in the list into the same Word Doc?

  80. dpg50000 says:

    Zigo – Under workflow settings set the check box that says "automatically start this workflow whenever an item is changed" to checked.

    Meg Wellman – You can select Current List rather than Current Item and create logic in the "Find the List Item" section to select another record other than the one being created.

    If you are using different list columns for each of the different records, you can do it.

    If you are using the same document property field as a placeholder for the list data in the document for the item created and the other list items, I believe you cannot.

  81. Matt says:

    Is there a way to remove empty fields name from the document?
    e.g. if this field is not filled in "Address2", you end up on the document "[Address2]".

  82. Daniel says:

    This example is good and worked in Sharepoint 2010.
    The biggest problem is when you wanna play a formatted list field in Word Doc. Write all in HTML.

  83. Brian says:

    Thank you – great post. I tried to do this using several Choice columns (both dropdown and checkbox) as well as Single line of text, and the Choice column selections don’t populate the Word doc. Any advice?

  84. mike says:

    Thanks for that helpful post.
    How about a solution for Sharepoint 2013? Anyone came across it so far?

  85. Sourav says:

    While creating the workflow when I am doing create new list item–><>, I am asked to provide value of a "Path and Name" field. It is a mandatory field, what should be its value?

  86. Sonya says:

    For all looking for a more powerful and reliable solution that doesn’t require installed Word, I suggest to look at Docentric Toolkit:
    This is a .NET mail-merge and document generation library that allows you to design template documents in MS Word and then call a single .NET method to populate such a template by providing the template and the data. It only requires couple of lines of code
    to integrate into a SharePoint project/add-on.

  87. russell says:

    I have this working on SharePoint 2013 by using a 2010 workflow and not a 2013 one.

  88. Asad Khan says:

    Great post! Found it very useful…Thanks 🙂

  89. Daniel Jones says:

    we use a solution that allows you to do this from within SharePoint Lists- with now code. It works for word, excel and PowerPoint templates using the merge-field or place holders. Also a workflow available for this- – it works great for us Highly recommended!

  90. mike says:

    very good post, worked perfectly, but I have one little problem:

    Im using SP2010 and need this list export for automatically generated reports.
    My workflow is starting only manually for now (for testing). If I start my workflow a second time on an already generated report, the new version is totally empty. It has the correct name (which is also a field of the list) but all other information could not
    be received.
    (If I start the workflow a third or more times, nothing changes. So I have to delete the existing file first, if I want a new version).

    My workflow is basically the same as in the manual on this page, but I checked the ‘overwrite existing file’ radio-button at the workflow. I tried to change my workflow, so that it deletes first the existing file, but I got errors on that (message said I may
    have not the sufficient permissions, which I do).

    Any idea ?