0

I have a word template which has a content control placeholder to hold rich text data. The data comes from a sharepoint list (rich text field) and may also include tables in it.

On checking the data from sharepoint list I found it returns me a HTML formatted data. I wish to place this data in the content placeholder with proper formatting.

For example if the data returned is HTML table ( format) I want a table to be created with data populated. Is there any method available to place the data in content control.

I found that third party tool converter at http://html2openxml.codeplex.com/ which is available for conversion, however this appends data to MainDocumentPart not to content control.

Please guide. Thanks in advance.

user2975939
  • 65
  • 1
  • 10

1 Answers1

0

You could try to use WordDocGenerator, which uses content controls. Then combine it with html2openxml, as discussed here. However, I find the formatting in some cases becomes terrible after adding the html content into your content control--one example is when inserting lists, the bullet points goes out of view when you open the document. I have not tried adding a whole table into a content control.

Frank Fajardo
  • 7,034
  • 1
  • 29
  • 47