26 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

Leave a Reply to Marcus Cancel reply

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.