web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : LVUt7uWbtFEtqe5SIyMQmx
Power Automate - Using Flows
Answered

Populated Word Template and Removing Content Control without Removing Text

Like (0) ShareShare
ReportReport
Posted on 3 Apr 2023 15:07:22 by 25

I'm able to populate a Word template using the Plain Text Content Control.  Once I've attempted to remove the content control in the populated Word document, the populated text is also removed.  I've searched, but I haven't found anything that explains why it's happening or how I can prevent it.  It looks like it has something to do with the text of the placeholder being replaced instead of text being actually added.  Anybody have an idea?

  • kathydev Profile Picture
    2 on 30 Apr 2024 at 17:46:38
    Re: Populated Word Template and Removing Content Control without Removing Text

    Is your workaround still effective? If so, could you please provide more details about the typing space? When I leave it empty, it seems to remove the plain text content control for me.

     

    To prevent this, click into the plain text content control and enter a space (make sure you're not in design mode).

  • acox Profile Picture
    95 on 12 Oct 2023 at 07:51:02
    Re: Populated Word Template and Removing Content Control without Removing Text

    Hey everyone,

     

    This is also doable with the Plumsail Documents tool. This tool makes it much easier to work with document generation. It also offers helpful features like checkboxes, conditional hiding, and more. Have a look at this article:

    Create Word document from template by populating it using Power Automate (Microsoft Flow), Azure Logic Apps, and PowerApps

     

    The solution is paid, but there is a free 30-day trial available.

  • Verified answer
    JaysYi Profile Picture
    25 on 09 Jun 2023 at 15:31:01
    Re: Populated Word Template and Removing Content Control without Removing Text

    I believe I figured out a workaround.

    1. Add the plain text content control in the template Word document.
    2. Add the appropriate Title and Tag in the plain text content control properties.
    3. Click into the plain text content control and type a space (not in design mode).

    After Power Automates populates the template, it appears I can remove all the content controls without removing the text.  I'm not sure why it works but it seems like Power Automate was populating the placeholder text and not the actual content if I don't type something into the content control itself.

  • JaysYi Profile Picture
    25 on 26 May 2023 at 21:38:37
    Re: Populated Word Template and Removing Content Control without Removing Text

    @v-wenjuan-msft ,

    Sorry for such a late reply.  But I tried your method but editing will delete everything much like removing the content control.  It seems like it's replacing the placeholder text ("Click or tap here to enter text.") instead of inserting the data from SharePoint as text.  Any more insight?

     

    Best,

    Jason

  • v-wenjuan-msft Profile Picture
    Microsoft Employee on 06 Apr 2023 at 09:48:18
    Re: Populated Word Template and Removing Content Control without Removing Text

    Hi @JaysYi ,

     

    Thanks for your further statement.

    I'm afraid that's how things work from Power Automate. Text you added by Power Automate is added to these content control rather that Word main body. Here the control works as a container, it tells the flow where to put the text.

     

    Sorry for any inconvenience caused by this design. Would you like to try settings in above response to see whether it helps you to some extent?

     

    Best regards,

    Wenjuan Zou

     

  • JaysYi Profile Picture
    25 on 04 Apr 2023 at 14:30:52
    Re: Populated Word Template and Removing Content Control without Removing Text

    @v-wenjuan-msft to clarify:

     

    1. I've added the plain text content control to a Word template.
    2. Then used Power Automate to populate the Word template with text from SharePoint
    3. Delete the content control in the created Word document.  However, when I delete the content control, it also deletes the text that was populated.

    I'm unsure why deleting the content control will also delete the text populated by Power Automate.  It's very strange that in other projects (separate Word template), it does not behave this way (i.e., when deleting the content control the underlying text remains).  Thanks!

  • v-wenjuan-msft Profile Picture
    Microsoft Employee on 04 Apr 2023 at 02:49:22
    Re: Populated Word Template and Removing Content Control without Removing Text

    Hi @JaysYi ,

     

    Do you mean you add content to the plain text content control via Power Automate flow, and now you would like to remove the control but leave the text in word still?

     

    As we know we have to put a control in word template so that we can add content via Power Automate. There's no doubt.

    We can set controls to disappear when users type in their own text. Please try and see whether it meets your request:

    vwenjuanmsft_0-1680576465212.png

     

    Check this link for further details:

    About content controls - Microsoft Support

     

    Best regards,

    Wenjuan Zou

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Featured topics

Restore a deleted flow