Skip to content

Power Automate Word Template and text formatting

I’m sorry that this guide is super limited, but it will give you an overall idea of what to do if you get stuck with Power Automate Word Template generation when trying to format the text. Currently, the Populate Word Template -action does not support any text formatting, so hyperlinks, colors, fonts, etc. you cannot change dynamically. There are Plumsail and Encodian actions that might make your life easier with this, but I can’t always use 3rd party solutions.
If you absolutely must have some formatting to the plain text controls, you can do the following:
  • Populate the Word template as you would normally, but instead of saving it as docx, save it as a zip-file
  • Unzip the file by using the Extract archive action
  • Locate the file document.xml from the ‘word’ subfolder
  • Get that file content to Power Automate and replace the text with the formatted values (this can be a bit tricky)
  • Replace the old document.xml with the new formatted document.xml
  • Zip the whole SharePoint folder location (this is complicated, but follow these instructions: https://global-sharepoint.com/sharepoint/create-zip-file-using-power-automate/)
  • Rename the file from YourDocument.zip to YourDocument.docx
And that’s it. Will be a painful process to go through, but doable. 

Leave a Reply

Your email address will not be published. Required fields are marked *