cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Fill Word Template Fields & Save in Document Library

Hi

I'm a bit of a Power Automate noob but have been making some progress on my flow.

Background:

We have various word templates set up for different electrical tests we perform on our products.

I want to use a SharePoint Document Library to store the test reports created from the templates.

Some SharePoint Document Library columns exist as fields in the templates so the content is synchronised between the document and the library (e.g. the document 'Subject', 'Title', 'ID', 'Version' etc are embedded as fields in the templates and are also columns in the library).

What I'm trying to achieve is:

A manually triggered flow that prompts for 'Subject' & 'Title' (and at present ID as I can't get my 'next available doc number' code working yet). The flow then opens the template associated with that flow, inserts the fields and saves the doc in the appropriate reports folder.

My issues:

It seems SharePoint Document Library fields must be 'rich text' to sync between the document and the library.

It seems the 'Populate a Microsoft Word template' action requires 'plain text' fields in the template.

If one of the fields is used in a header or footer and the first page header/footer is different to other pages, that field appears multiple times in the Populate... action dialogue.

It seems the 'Populate a Microsoft Word template' action ONLY works with .docx files and not .dotx (not a bit issue for me)

There seems to be some kind of cache issue with the template when running the flow - If I update the template and run the flow again, it uses the previous version of the template.  If I reselect the template using the file picker in the Populate... action, I seem to get the updated template but also some weird numbered fields that don't exist in the new template.

 

Is there a way to resolve the rich text vs plain text field issue (does anyone else have this issue?).  I can live with the other problems.

 

Thanks

Craig

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hello @Craig_Lawrie ,

 

This is a known limitation on Word document: Please refer:

https://docs.microsoft.com/en-us/connectors/wordonlinebusiness/#known-issues-and-limitations

 

There is a way to convert the Rich text to Plain text.

Please check the below doc on how to use Plain text instead of Rich Text:

https://natechamberlain.com/2019/05/06/the-selected-file-doesnt-contain-template-elements-error-in-m...

 

Thanks and Regards,

     Vikas K

 

 

View solution in original post

1 REPLY 1
Community Support
Community Support

Hello @Craig_Lawrie ,

 

This is a known limitation on Word document: Please refer:

https://docs.microsoft.com/en-us/connectors/wordonlinebusiness/#known-issues-and-limitations

 

There is a way to convert the Rich text to Plain text.

Please check the below doc on how to use Plain text instead of Rich Text:

https://natechamberlain.com/2019/05/06/the-selected-file-doesnt-contain-template-elements-error-in-m...

 

Thanks and Regards,

     Vikas K

 

 

View solution in original post

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (6,572)