Insert Text to Word File

Insert Text to Word File

Description

You can insert text to a Word DOCX file at a certain position indicated by a placeholder.

Input Arguments

Input ArgumentTypeDescriptionRequired?Advanced Option?Default
Existing File ContentDynamic ContentThe Word document which shall be used to insert text into it. Must be a file – Base64 string is not supported.✔️-
Placeholder nameStringThe string which indicates the placeholder. Hence, the position where the text is inserted at in the Word document.✔️-
Placeholder text StringThe text which shall be added to a Word document.-
Placeholder Prefix StringOpening placeholder delimiter e.g. {{InsertHere}}.✔️'{{'
Placeholder SuffixStringClosing placeholder delimiter e.g. {{InsertHere}}.✔️'}}'

Output

ResponseTypeDescription
File responseFileThe updated Word file (docx) with the inserted text.
File response as stringStringThe updated Word file as a base64-encoded string. Useful for storing in variables, Dataverse, or passing to other actions.
MIME typeStringThe MIME type of the file, typically application/vnd.openxmlformats-officedocument.wordprocessingml.document.
ExtensionStringThe file extension, e.g., docx.

Power Automate Examples

Insert Text to Word File

We use Get file content to retrieve an existing Word document. In same existing Word document we included a text about a giraffe and the placeholder code: "##placeholder##". At the position of the placeholder code, the placeholder text will be inserted. Thereafter, the Word is being saved.

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!