40 comments

  • Great post. Could this be done using a custom list instead of a document library? I have a similar need but all my information is contained in a sharepoint custom list.

    Like

    • To spit out a document, though… you’d at least need to have a document library to use as a staging area, and the library would need to have all the same metadata as the list. Flow can even add the document as an attachment to your SP list item at the end, there’s an action for that.

      Like

    • Great Post! thank you for the information!

      I am facing a similar problem, I would like the trigger be “When an item is created” from a SP List and use this information to be filled in the Word Template document storage in the Library, however it has not worked well for me.

      I would like that every time I add an item in the SP List, this creates a Word document filled with this information, then send an email (as explain in your steps 🙂 ) and add the document as an attachment in the SP List.

      When opening the word document on my desktop with the word application from SP or when opening the attachment sent by email, it does not send the correct document – it sends the template with the tags not replaced.

      I am using drop down value and person value (I have a column name Employee and the value is Person) in some of my columns.

      Is something else I am missing?

      I will truly appreciate any suggestion,

      Thanks,
      Veronica

      Like

  • Excelent post! I’m developing a solution using quick parts, however when i try to save this document as PDF from Microsoft Flow using Plumsail it does not show the quick part data, only the tags 😦 Do you know any solution? Thanks in advace

    Like

  • Thanks for this post. It came at the right moment. I have was looking for a solution with the same problem. I followed your instruction but when I send the e-mail the attachment still shows only the template and not the values. The Word document has all the values in it.

    Like

    • The user you are sending the word document must have at lest read access to the document library or list where the values are saved. If is an external user, you could convert it to PDF (Muhimbi works for me) before send it.

      Regards,
      Carlos

      Like

  • Thank you for this post! Are these quick parts also restricted to 255 characters only? Is there any way to copy data from a SharePoint column to the Word template if the data string is longer than 255 characters? I haven’t found a way to build the document using bookmarks and form fields only hold 255 max. Thank you in advance!

    Like

  • This is great! I was able sort of get this working with a list. However the resulting entry in the Doc Library has a blank icon (so it doesn’t appear to be any kind of file type). And it won’t open as a file. What do you think I’m doing wrong?

    Like

    • Michael K. Malloy

      I figured out that I had forgotten to add the .docx at the end of the file name! Geesh!

      Like

  • Michael K. Malloy

    This is awesome. Thank you! I have been able to get this to work with a list item creating the new file in a doc library. I have even been able to configure a doc library column as multiple lines of text with enhanced rich text (for bullet points). Unfortunately, my data is showing up with html tags in the quick part within the word doc. Is there any out of the box way to fix this?

    Like

  • I have triggered this in PowerApps. I am getting a Flow failure “Action ‘Get file content’ failed”.
    Error Details “The response is not in a JSON format”. Also when I open the template in Word Online, I cannot see any of the merge fields (I put a couple of test items in the template Library item record). I normally do these merges in MS Access directly from the SharePoint list, however your solution will be far better and more immediate if I can get it working.

    Like

    • The template isn’t going to work in Word Online, but for this solution it doesn’t matter. Did you try this solution with a manual trigger instead of from PowerApps, like in the steps? I don’t know what kind of data is being sent from your PowerApp.

      Like

  • Thanks for this. Very Informative post. However I have 2 questions

    1. Can we do the same with an Excel File?

    2. We like to use this for a Purchase Requisition. Where the PR Number and Date will be same however we may have 3 or 4 line items. How do we get all the line items to show as a table on the Word/Excel Document

    Like

  • Hi, after creating the file and update the file properties, I can only update document Title and have no other fields. Do you know why? Thank you.

    Like

    • Gregory MacGregor

      I’m having the same issue as Geir André, only document Title can be modified, and in my case I can also modify the document library’s required columns, but that should happen regardless of what file I’m working with.

      Like

    • As long as you’ve created the metadata columns, from then on when you create a file directly in the library, then the fields should be there. I’m not sure how that could go wrong. Try different permutations of ways that you’re creating the file?

      Like

    • Gregory MacGregor

      Ok so the way I solved it was creating a new Document Type (with the hassle that entails), create a new Word document with that document type, populate fields inside the document and map them to the fields that are part of the document type.

      It’s one of these typical convoluted SharePoint steps but I guess it makes some sense. Works like a charm now 🙂

      Like

  • Great posting Laura. Was wondering whether I could insert list of item using this method? like a list of items procured or something in that nature

    Like

  • I have created a SharePoint list with a flow attached to create a word document based on a template using the Document Property Quick Parts. Everything is working fine except if there has been no text entered into a field. The Word document shows the Quick Part Tags which I would like to be blank if no data is entered.

    Like

  • This is exactly what I wanted. Worked like a charm. You’re the best. Thank you!

    Like

  • You are the best!! These instructions, screenshots everything is awesome. Thanks a ton. I have been searching for this since months and found it today and id it in 3 hours. Thanks very much. Great job.

    Like

  • Love this. One question, do the templates have to be on the same library as the docs you are saving into?

    Like

  • Thanks for the info! I currently have a SharePoint list where I need to create a word doc based on the selected list item. I’ve followed your steps, but I am getting the error “One or more field types are not installed properly”. Have you come across this before? I’m curious if I am getting this error message because I am using date, person, number, and choice content types.

    Like

  • looks like using a rich-text metadata column type remains an open issue. any updates from folks that have that working?

    Like

  • has anyone found a way to support the rich-text metadata column type?

    Like

  • I’ve created a flow that starts with a form, the data goes into a list, and the list should be populating my Word doc. The flows run smoothly and without error; however, the doc never actually populates. It creates a new document in the library, but it’s an unassigned file format. Once I select for the file to be opened in Word, it opens a document identical to the template–without any of the unique QuickParts info.

    Any idea why that could be happening?

    Like

    • I recommend trying to isolate the issue by directly populating the library columns via a flow, without involving your list. See if that works, and you’ll know which direction to troubleshoot. Try populating columns on a specific file that’s already in the library, then try making it create the new file and then update the properties, so you can see where it’s going wrong.

      Like

  • Thank you for this amazing infos! I am struggeling with the quick party from word. Is there also a way to insert the word document version?
    I tried several options to insert the version, but i could not find any way. I also tired it with the label function inside the “Information management policies settings”. Do you know any way to insert the document version just like all the other metadata?

    Like

  • Thank you for the fast response.
    Would you mind if you give it a try? We are very desperate about this problem and it is such a urgent problem for us.. 😦
    Also would be a nice post for this site in future 😉

    Like

  • Thanks so much for your instructions on how to create a Word document from a sharepoint list item. The power of your brain amazes me.
    I’ve been using your page as a reference now for a while. e.g. for my school’s sporting program, coaches fill in a match report form that creates a nicely formatted Word Document that is emailed to the Heads of Sport. Lovely.
    Someone today tried to copy the reports from the Sharepoint Library where they were created to another Sharepoint Library. The result was blank templates (none of the content copied across).
    If I copy them to my desktop no problems. If I copy them to another SP library, empty documents.

    I am guessing the Documents are dynamic and do not see any data in the new Sharepoint Library and are therefore empty.
    Wondering if you know of a way to ‘finish off’ the new Word Documents so they become stand-alone? I could convert to PDF but they occasionally need to be edited.

    Regards
    Scott

    Like

  • Caveat on the use of Word Templates.
    While they are stand-alone Word Documents, each file created remains a template file and the data in each field in uneditable. I’ve had to abandon the use of Word Documents completely. I’ll try PDFs as they can edit them using Acrobat.

    Like

Leave a reply or question

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.