Question

I have a scenario where users will be adding list items to a custom list. Once a week, a single word document needs to be generated that includes content from all of the list items added that week.

I have seen how, using a workflow, you can insert column data from a list item into a document template, but it seems as though this will generate one word document per list item, and I need to combine data from multiple list items into the same doc, formatted roughly as follows:

Column 1 value (from list item 1)

  1. Column 2 value (from list item 1)
  2. Column 3 value (from list item 1)

Column 1 value (from list item 2)

  1. Column 2 value (from list item 2)
  2. Column 3 value (from list item 2)

etc...

Is there a way to set up a repeating templated section in a Word doc and have a workflow generate a new section per list item? This could be a 2010 workflow or a 2013 workflow.

Or is this something I'm going to have to accomplish with C#?

Was it helpful?

Solution

Its not possible also workflow is not a best solution for this scenario. You need to create a custom SharePoint timer job and have it run on a weekly basis.

In the timer job solution, You can use C# and Open XML or office dll's to generate the custom word document based on the list fields.

you can refer the below links for better understanding:

Open XML

Custom SP timer job creation

Also, This

Apart from this, if you want to have an on-demand feature then you can even create a custom feature action based on list scope in which you can invoke an layouts page for generating the word documents.

Refer this

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top