Find Text
Description
This activity locates the text within the designated Word document and provides its precise position and the corresponding page index.
You can only use this activity inside Word Context.
Design Time Configuration
At design time, you can configure the following properties:
-
Find What - Specify the Text to search.
-
Result - Returns the Text positions and Text location in the form of page indexes.
-
Occurrence - Select the occurrences of the specified text or bookmark relative to which to add the image. The following options are available:
Option Description All Insert the image at every occurrence First Insert the picture only at the first occurrence Last Insert the picture only at the last occurrence
Advanced Options
Users can use this dialogue to execute a text search with enhanced functionalities. For information on searching your text using advanced options, see the Advance Options dialog section.
-
Page(s) to search—Use the options below to search for specific text within one or more pages.
Option Description All Choose this option to search for text on all the page(s). Single Choose this option to search the text on one page. Range Choose this option to search the text on the range of page(s). -
Read page by—This option becomes accessible exclusively when Single is chosen under Page(s) to search. It allows for the specification of the page index or number to facilitate the selection of subsequent options.
Option Description Page Index Select this selection to access the page via its index. Page Number Choose this option to access the page using its number.
The page index denotes the fixed physical page number, whereas the page number is user-defined and customizable. Users can define it on any page within the document's Header or Footer.
-
From page—When Page(s) to search is configured to Range, designate the initial page to initiate the text search.
-
To page—When Page(s) to search is set to Range, indicate the concluding page number within the range for text search.
-
Page number—If Page(s) to search is set to Single define the specific page number for text search.
-
Search In—Determine whether to search for text within the document's Body, Header, or Footer.
Option Description Select All Enable this option to search for text across all page sections (Body, Header, and Footer). Body Enable this option to search for text within the page's Body. Header Enable this option to search for text within the page's header. Footer Enable this option to search for text within the page's footer. -
Match case - Activating this option conducts a case-sensitive search; otherwise, it performs a case-insensitive search.
-
Match whole words only—Enabling this feature prevents partial matches. For instance, searching for "One" will not yield results for "Someone".
-
Use regular expression—Enabling this functionality permits the specification of a regular expression and retrieves any text that matches the expression.
Properties
Misc
- DisplayName – Add a display name to your activity.
- Private – By default, activity will log the values of your properties inside your workflow. If private is selected, then it stops logging.
Optional
- Continue On Error – It Specifies whether the automation should continue even when the activity throws an error. If True, the activity continues without throwing any exceptions. If False, the activity throws an exception. The default value is False.
It does not catch an error if this activity is present inside the Try-Catch block and this property's value is True.
Example
Download Example