I have set up a workflow that can generate a Word document for one item in a custom list.

I'd like to add a button to have the workflow add all items selected in the custom list and put them into the Word document - is there a way to loop through the custom list and add them to the Word document? Or is there a way to click on a button and all items in the view are put into Word document?


there is no OOTB way to achieve this.

If you want to implement this you would need to take a closer look at the openXML API which allows you to create office documents. This is custom code, so you need to move it into a webservice. This webservice can then be called from a SP2013 workflow.

Creating documents is a "long running task" so consider that this webservice should make a callback once done, and not let WFM wait on the result of this action.

Hope this helps

Edit: OpenXML SDK Starting point: https://blogs.office.com/en-us/2014/06/25/open-xml-sdk-goes-open-source/

Add custom webservice to workflows https://docs.microsoft.com/en-us/sharepoint/dev/general-development/working-with-web-services-in-sharepoint-workflows-using-sharepoint-designer

  • Thank you. I'll look into this. I haven't done that before. Is there any documentation or examples I could see that you would recommend? – user74837 Mar 22 '18 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.