cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
craigmk1987
Helper II
Helper II

Populate word document is blank

Hello 

 

I'm trying to populate a word document from an array.

 

I've followed this tutorial Intermediate | Flow of the week: Create PDF Invoices Using Word Templates with Microsoft Flow | Powe... 

 

When I try to populate the merge fields from my array, it's producing blank outputs. I'm not sure where or why I'm going wrong. 

 

You can see my word inputs here:

craigmk1987_0-1619348956046.png

I've mapped the fields as per the instruction (labels being my array):

craigmk1987_1-1619349023564.png

My word document is setup where I've created a table, wrapped repeating content around the table and then inserted plain text (which is what is titled array):

craigmk1987_2-1619349106461.png

Any help would be greatly appreciated. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Mira_Ghaly
Dual Super User
Dual Super User

Hi @craigmk1987 

You need to define the your columns that will appear on your word template as below:

Mira_Ghaly_0-1619349529639.png

I am detailing this solution in the below blog article :

https://onlinemgblog.wordpress.com/2020/06/20/populate-a-word-document-using-power-automate/

 

Hope this helps you !

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

6 REPLIES 6
Mira_Ghaly
Dual Super User
Dual Super User

Hi @craigmk1987 

You need to define the your columns that will appear on your word template as below:

Mira_Ghaly_0-1619349529639.png

I am detailing this solution in the below blog article :

https://onlinemgblog.wordpress.com/2020/06/20/populate-a-word-document-using-power-automate/

 

Hope this helps you !

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Hi Mira,

 

Thanks - your blog certainly helped me to populate the document. 

 

I am now looking through too create more than one column (rather than have lots of pages and only one column. I can't seem to get it to populate into more than one column. Can you help? 

 

Here is my output:

craigmk1987_1-1619363328074.png

 

Ideally, I'd like the table to use the next column available rather than use lots of pages based on one column.. 

 

Thanks!

Craig

 

@craigmk1987 

So in your word template , click insert new column and add inside it a Plain Text Control and set it is name and display name and make sure it matches the names on the array you are passing.

Can you share how your word document currently looks like?

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Hi @Mira_Ghaly,

 

Thank you. Yes, this is what I'm now managing to output into a word/pdf document

craigmk1987_1-1619421585161.png

But I'd like it to output like this (I appreciate that rich text doesn't work, so as long as I can produce the desired output, I can then format it from there):

craigmk1987_2-1619421800089.png

 

The data is not from the same source, but essentially it's to extract a stock order and put it into a label format (L7160) that I can then print. The output source takes each stock item on the stock order and attaches a location for it. But currently word is copying and pasting into the next column - whereas I'd like it to iterate through and insert each array item into a column to the right, rather than going down by row. I hope that makes sense (and gives a bit more context). 

craigmk1987
Helper II
Helper II

I found a video on YouTube where the author suggested putting the word document into columns to “fool” word into delivering the desired output - which it did! 

neerajmohanty
Frequent Visitor

Hi, 
I am creating a flow to populate a word document when a form is filled. I am not sure what format the document created is. I get an email, and the attachment is not a word document. 

 

the flow is attached below. 

1122

 

This is the output and the attachment is not a proper .doc or .docx file. There are no errors or warnings on the flows as well. 

3 - output. the attachment is not a word format document or .docx..3 - output. the attachment is not a word format document or .docx..

Need your inputs to resolve this. 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,006)