cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FlowUser2
Level: Powered On

Populate a Word Template - Text Formatting

Hello,

 

I set up a flow that takes responses from MS Forms and uses the Populate Word Template action from the Word Online Connector to populate the responses into a Word document. The issue I'm running into, is that if someone fills out a text answers that contains an apostrophe, the text box will display ''' instead of an apostrophe on the Word document. It will also do the same thing for quotes and ampersands. Has anyone else dealt with this issue?

 

2-28-2019 12-43-52 PM.png

8 REPLIES 8
Super User
Super User

Re: Populate a Word Template - Text Formatting

Hi @FlowUser2 , thank you for your post!

Have a look below at this link and the images below:Capture-251.png

The "HTML to text" connector does what you ask, you'd just need to target the values you are looking for in your form output beofre populating your template.Capture-252.png

If you have found my post helpful, please mark thumbs up.

If this post has solved your problem, please click "Accept as Solution".

Any other questions, just ask.

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


FlowUser2
Level: Powered On

Re: Populate a Word Template - Text Formatting

Hi @AlanPs1, thank you for your reply and sorry to take so long to get back to you. I tried what you suggested but unfortunately it did not affect the output. The text being input appears clean, it's only when the data appears on the word document that the formatting is off. I set up a test flow so that you can see what I mean:

Flow setup:

flow1png.jpg

 

 

flow2.jpg

flow3.jpgflow4.jpg

The is the output on the Word Doc:  flow6.jpg

Super User
Super User

Re: Populate a Word Template - Text Formatting

Hi @FlowUser2 

Thank you for doing that test, it was really helpful and I have recreated it and get the same issue. I am working with ways to try and get round it but it may be a limitation at present. So, leave it with me, unless of course another doc format would work and maybe we could look at approaching it another way.

Thanks, Alan

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


KeringStoreSupp
Level: Powered On

Re: Populate a Word Template - Text Formatting

Hello guys,

I am in the same situation.

When trying to populate a Microsoft Word document with fields coming from a MS Form, I get " in the Word Document. I am trying to subsitute the chars with @replace formula, but it's not working.
The only "workaround" for now is to strip the bad chars.

I think this is something that has to deal with XML and the Word Template.

Those chars in the template fields should be escaped somehow maybe?

 

Any suggestions?

Thanks for your help.

 

Andrea

FlowUser2
Level: Powered On

Re: Populate a Word Template - Text Formatting

Unfortunalty, I believe it's because only the plain text content control is supported. I tried a number of manipulations on the Flow side, but because the text is normal until it hits the Word doc, everything looks fine as far as Flow knows.

 

I had to move on to other things, so like you I am just using nested replaces to remove the unsupported characters and replacing '&' with 'and'. Not the most ideal or professional looking option, but until the connector is updated to support rich text content controls there doesn't appear to be anything else that can be done.

 

If you end up figuring something out, I would love to hear about it. I'll update this thread is well if I end up coming across anything.

 

 

KeringStoreSupp
Level: Powered On

Re: Populate a Word Template - Text Formatting

Hello,

the only workaround I figured out is to replace the " ' " carachter with " ` " when populating the Word document in the bloc "Popoluate a Microsoft Word Template (Preview)"

 

replace(body('Get_response_details')?['ra0814f15501a46c7bb0cd158bbd39507'],'''','`')
 
2019-05-17_115738.jpg
 
gazzo1967
Level 8

Re: Populate a Word Template - Text Formatting

@KeringStoreSupp 

Hi 

Where does this solution fit into the actual flow? 

I have the same issue 😞

Gary

KeringStoreSupp
Level: Powered On

Re: Populate a Word Template - Text Formatting

Hello,

it goes in the bloc of instructions: "Populate a Microsoft Word Template"

 

2019-08-21_163041.jpg

 

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,867)