** AVAILABLE NOVEMBER / DECEMBER 2024 **
Overview
The 'Word - Replace Text' action for Power Automate provides the capability to search for text fragments within Microsoft Word documents and replace with alternative text.
Credit Count
This action consumes 1 credit per operation.
Note, different Encodian actions can consume different number credits. Please always check the action specific documentation and read What is an Encodian Action for a full description of how credits are consumed.
Default Options
The default 'Word - Replace Text' flow action parameters are detailed below:
- Filename: The filename of the source Microsoft Word file, the file extension is mandatory: 'file.docx' and not 'file'
- File Content: A Base64 encoded representation of the PDF file to be processed.
- Phrases: An array of phrases (See below for further details)
Phrases
For each phrase; the 'Search Text' value will be replaced with the 'Replacement Text' value. By default; Text fragments are located by finding matching instances of the 'Search Text' parameter, to use a regular expression search simply set the 'Is Expression' value to 'true' so that the 'Search Text' parameter will be evaluated as a regular expression and not a free text search.
Multiple phrases can be included within a single operation. To add more than one phrase click the 'Add new item' button:
-
Phrase
- Search Text: The text to locate and replace with the 'Replacement Text' value
- Is Expression: Set whether the 'Search Text' value should be evaluated as a regular expression, the default value is 'false'
- Replacement Text: The value to replace the 'Search Text' text with
- Find Whole Words Only: Set whether only entire words should be found
- Case Sensitive: Set if the 'Search Text' value should be evaluated as case sensitive
By default; all of the following options will 'Inherit' the existing properties in the Word document, which is applied to the text value being replaced, use the options below to override this if required:
-
- Font: The font name to be used on the 'Replacement Text'. If the 'Font' is not set, it will inherit the current font used in the document
- Font - Colour: The font colour to be used on the 'Replacement Text', the default setting is 'Inherit'
- Font - Size: The size of the font to be used for the 'Replacement Text'. If font size is not set, it will inherit the current font size used in the document
- Style - Background Colour: The background colour to be used on the 'Replacement Text', the default setting is 'Inherit'
- Style - Bold: Set whether the 'Replacement Text' is set to be 'Bold', the default is 'Inherit'
- Style - Italic: Set whether the 'Replacement Text' is set to be 'Italic', the default is 'Inherit'
- Style - Strikethrough: Set whether the 'Replacement Text' is 'Struck Through', the default is 'Inherit'
- Style - Double Strikethrough: Set whether the 'Replacement Text' is 'Double-struck Through', the default is 'Inherit'
- Style - Subscript: Set whether the 'Replacement Text' is 'Subscript', the default is 'Inherit'
- Style - Superscript: Set whether the 'Replacement Text' is 'Superscript', the default is 'Inherit'
- Style - Underline: Set whether the 'Replacement Text' should be 'Underlined', the default value is 'Inherit'
- Word Spacing: The word spacing to apply to the 'Replacement Text'. If 'Word Spacing' is not set, it will inherit the current word spacing used in the document
Please refer to the Obtaining the 'File Contents' Parameter article for guidance on how to obtain the 'File Content' parameter ready to provide to an Encodian flow action.
Advanced Parameters
The advanced 'Word - Replace Text' flow action parameters are detailed below:
- Culture Name: This setting is used to set the culture for processing the request. Please refer to the Culture Names article for a list of supported cultures
Return Parameters
The 'Word - Replace Text' flow action returns the following data.
Action Specific Return Values
- File Content - The processed word document (Base64)
Standard Return Values
- OperationId - The unique ID assigned to this operation.
- HttpStatusCode - The HTTP Status code for the response.
- HttpStatusMessage - The HTTP Status message for the response.
- Errors - An array of error messages should an error occur.
- Operation Status - Indicates whether the operation has been completed, has been queued or has failed.
0 Comments