Insert Multiple Text Sections To Word

Insert Multiple Text Sections To Word

Description

This action allows you to insert multiple pieces of text into a Word (DOCX) document at specific placeholder locations. You must provide an existing Word file, which contains placeholder markers defined by a prefix, suffix, and a name (e.g., {{InsertHere}}).

Input Arguments

Input ArgumentTypeDescriptionRequired?Advanced Option?Default
Existing File ContentFileA Word (DOCX) file to update. If empty, a new document is created. Must be a file – Base64 string is not supported.✔️-
Placeholder Name - 1TextThe text between prefix and suffix where to insert the text, e.g. {{InsertHere}}.✔️-
Placeholder Text - 1TextPlaceholder text-
+ Add new itemRepeatingAdd more sections with their own Placeholder Name and Placeholder Text.-
Placeholder Prefix StringOpening placeholder delimiter e.g. {{InsertHere}}.✔️'{{'
Placeholder Suffix StringClosing placeholder delimiter e.g. {{InsertHere}}.✔️'}}'

Output

ResponseTypeDescription
File responseDOCXThe updated Word file
File response as stringStringThe file content as a string. This can be stored in a variable, saved to Dataverse, or passed to other actions that require the file content in string format.
MIME typeStringThe MIME type of the DOCX file
ExtensiondocxThe file extension (always docx)

Power Automate Examples

Insert Multiple Text Sections To Word

You need to provide the existing Word (DOCX) file containing placeholders (in our case, from the OneDrive action Get file content), specify the placeholder names (without the surrounding braces) in the field Placeholder Name - 1, and enter the text that should replace each placeholder in the field Placeholder Text - 1.

You can add multiple placeholder-text pairs, and optionally define the prefix and suffix used around the placeholders (default is {{ and }}), but in our case, we use ##.

Picture

💡

Looking for the response to this example? Scroll up to see the Output tab.

Known Limitations

⚠️
If you experienced other limitations please get in touch with us!