Color formatting in Word document Populated from a SharePoint list

%3CLINGO-SUB%20id%3D%22lingo-sub-2401327%22%20slang%3D%22en-US%22%3EColor%20formatting%20in%20Word%20document%20Populated%20from%20a%20SharePoint%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2401327%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CU%3E%5BImplementing%20Environment%20-%20Office365%5D%3C%2FU%3E%3C%2FP%3E%3CP%3EI%20am%20working%20on%20a%20requirement%20where%20in%20its%20required%20to%20generate%20a%20PDF%20document%20whenever%20a%20List%20item%20is%20added.%20I%20have%20implemented%20this%20functionality%20using%20Automate%20Flow%20where%20in%20the%20flow%20reads%20the%20list%20item%20and%20get%20the%20content%20from%20Word%20template.%20Inside%20the%20word%20Template%2C%20using%20Quick%20Parts%2C%20placed%20the%20Document%20Property%20in%20a%20designed%20template%20format.%20My%20flow%20creates%20the%20file%20in%20Document%20library%20using%20the%20contents%20taken%20from%20the%20Word%20Template%20and%20with%20OneDrive%20converter%2C%20generated%20the%20PDF.%20Till%20this%20point%20everything%20is%20fine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPhase%202%20of%20requirement%20is%20the%20template%20has%20few%20rows%20which%20are%20colored%20based%20upon%20the%20Document%20Property%20Value.%20Sharing%20the%20screenshot%20below%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Alanda2021_0-1622470318367.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F285121i6E5E8077C8C7EB68%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Alanda2021_0-1622470318367.png%22%20alt%3D%22Alanda2021_0-1622470318367.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThis%20was%20manual%20and%20they%20want%20it%20to%20be%20automated.%20Now%20Document%20library%20doesn't%20take%20rich%20text%20and%20thus%20the%20rich%20text%20in%20Populated%20word%20document%20is%20displayed%20as%20plain%20text%20so%20any%20html%20tags%20would%20be%20displayed.%20And%20I%20understand%2C%20with%20the%20current%20capability%20of%20Automate%20Flow%20and%20SharePoint%20Online%20Document%20Library%2C%20this%20is%20not%20possible.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20question%20is%20%3A%3C%2FP%3E%3COL%3E%3CLI%3EHow%20can%20this%20be%20rendered%20dynamically%3F%3C%2FLI%3E%3CLI%3EIs%20Using%20Macros%20to%20implement%20this%20is%20preferred%3F%20If%20so%2C%20Kindly%20share%20some%20suitable%20links%20as%20I%20am%20very%20much%20new%20to%20it.%3C%2FLI%3E%3CLI%3EHow%20about%20SPFX%3F%20If%20yes%2C%20how%20it%20can%20be%20implemented.%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20You!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlanda%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2401327%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFiles%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFlow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2406776%22%20slang%3D%22en-US%22%3ERe%3A%20Color%20formatting%20in%20Word%20document%20Populated%20from%20a%20SharePoint%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2406776%22%20slang%3D%22en-US%22%3EAppreciate%20your%20response.%20Much%20needed%20input.%3C%2FLINGO-BODY%3E
New Contributor

Hello All,

 

[Implementing Environment - Office365]

I am working on a requirement where in its required to generate a PDF document whenever a List item is added. I have implemented this functionality using Automate Flow where in the flow reads the list item and get the content from Word template. Inside the word Template, using Quick Parts, placed the Document Property in a designed template format. My flow creates the file in Document library using the contents taken from the Word Template and with OneDrive converter, generated the PDF. Till this point everything is fine.

 

Phase 2 of requirement is the template has few rows which are colored based upon the Document Property Value. Sharing the screenshot below:

Alanda2021_0-1622470318367.png

This was manual and they want it to be automated. Now Document library doesn't take rich text and thus the rich text in Populated word document is displayed as plain text so any html tags would be displayed. And I understand, with the current capability of Automate Flow and SharePoint Online Document Library, this is not possible.

 

My question is :

  1. How can this be rendered dynamically?
  2. Is Using Macros to implement this is preferred? If so, Kindly share some suitable links as I am very much new to it.
  3. How about SPFX? If yes, how it can be implemented.

 

Thank You!

 

 

Alanda

1 Reply
Appreciate your response. Much needed input.