Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - General Discussion
Unanswered

Populating word template with image inside repeating section control

Like (0) ShareShare
ReportReport
Posted on 8 Jun 2023 00:49:27 by 359

Hi all,

 

I need some help with a an issue I'm having.

 

I have a word template set up that has a few text controls for the populate word template connector to fill. This all works fine.

However, I have an item in SharePoint with multiple pdfs as attachments. I want these to be put into the word doc. I tried doing this by using a repeating content control with a picture inside of it, but that doesn't seem to show in the connector. I have found a few articles talking about creating an HTML document instead and inserting the files into that, but it looks complicated and wanted to ask about this here before putting a lot of time into that.

For starters, can pdfs be put into the picture control at all? If not, how would I insert a pdf into the doc through the connector. I don't need an interactive pdf, just basically a screenshot of its content.

 

Is there an easier way to do this that I'm missing?

 

Thanks

  • BradonK Profile Picture
    359 on 09 Jun 2023 at 04:30:19
    Re: Populating word template with image inside repeating section control

    Hi @iAM_BA ,

     

    Thanks for the walkthrough.

    I'm having a couple issues.

     

    For the moment I'm trying to get all the attachments off a sharepoint list item and put them in the word doc.

    I followed what you said and now a I have a system that gets the attachments of the item, then gets the file content for each one and appends it to an array. It then gets passed to a compose action so that I can add it to the populate word doc action. 

     

    Unfortunately, this isn't working. When I get the file content as base64 it puts [] around the data. Does this invalidate the JSON schema?

    Also, I don't know what term to put in the word doc for the data.

    I currently have:

    <<foreach [value in formContent]>> <<image [value.content]>> <</foreach>>

    But I'm not sure what the term after value. should be.

     

    These are the pictures for the flow.

     

    BradonK_0-1686284896880.pngBradonK_1-1686284904450.png

     

    Thanks again

     

  • BradonK Profile Picture
    359 on 08 Jun 2023 at 06:38:30
    Re: Populating word template with image inside repeating section control

    Hi @iAM_BA ,

     

    I had a look through the links in that post and it looks promising, but I have no experience with HTML and so am a bit confused.

     

    The plan is to have a repeating control with an image inside of it. That image will be each page of the attachments. So the image will repeat for the amount of pages in the attachments. That is by itself, I'm just trying to get the attachments into the word doc.

     

    Secondly I want a table with three columns. Name, Date, and Signature. I have the signatures as jpg files so simply want to add these into the table as a repeating control again.

    Unfortunately since an image control can't go inside a repeating control, I can't do either of these things easily.

     

    I saw the replace text with image, but since its a repeating control, it wont just be one text. So I'm not sure what to do there.

     

    I have exported my word file as HTML but don't know where to go from there.

     

    Thanks

  • iAM_BA Profile Picture
    145 on 08 Jun 2023 at 06:10:09
    Re: Populating word template with image inside repeating section control

    Hi @BradonK 

     

    You want to add in table ? or any specific format?

     Please check then following link. 

     

    https://powerusers.microsoft.com/t5/Building-Flows/Inserting-images-via-repeating-tables-in-the-Word-Online/td-p/573257

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • BradonK Profile Picture
    359 on 08 Jun 2023 at 06:06:23
    Re: Populating word template with image inside repeating section control

    Hi @iAM_BA ,

     

    Thanks but that doesn't cover repeating images. I am able to have an image control and use that, but placing the image section inside a repeating section doesn't work. 

     

    Thanks

  • iAM_BA Profile Picture
    145 on 08 Jun 2023 at 05:50:04
    Re: Populating word template with image inside repeating section control

    Hi @BradonK 
    I have tried word populate for Image and Text field also  by using following link. 

    This link will useful for you. 
    https://www.youtube.com/watch?v=fpspoJNu5SI

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - General Discussion

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 8 Super User 2025 Season 1

#2
ankit_singhal Profile Picture

ankit_singhal 7 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 4 Super User 2025 Season 1

Overall leaderboard
Loading started