Replace Bookmarks With Text

Last Updated: 08/20/2018 Introduced in Version: 2.0

Overview

This tutorial demonstrates how to use Replace Bookmarks With Text step from Data > Documents category in the ToolBox. This step gets bookmarks from the Constant Word Document, replaces them with a desirable Text, and returns an updated Document File.

 

Example

We begin in the Designer Folder by clicking Create Flow on the Folder Actions panel.

 

Then, we Name our Flow and click Create to proceed to the Flow Designer.

 

 

 

First, in the Flow Designer, we add a form that we have created to take an Invoice. We will use this Form to get user inputs for our Bookmarks. In this example we add this Form from Flows, Rules, Forms and Reports > Forms [Interactions] > [Parent Folder] > Replacing Bookmarks With Text category.

 

2016-12-20_093845

 

This form was designed for Replacing Bookmarks With Text (Dynamic) tutorial. It has Text Boxes and Date Pickers for user inputs, and a Submit Button control to submit the Form.

 

2016-12-20_093948

 

Next, we add Replace Bookmarks With Text step from All Steps [Catalog] > Data > Documents category in the Quick Add Step dialog.

 

2016-12-20_094532

 

We select this step on the workspace and Step Information Layer pops up. In the Configuration section we use Pick Document File selector to pick our Word Document File.

 

2016-12-20_094615

 

Document File for this Example looks as following. It is a Template for Invoice with Bookmarks everywhere where text enclosed with square brackets.

 

 originalWordDoc

 

In the Flow Designer, we select Edit Input Mapping option from Replace Bookmarks With Text step’s Options Menu.

 

2016-12-20_094923

 

In the Mapping Editor we connect the Outcome Data Fields from the Form to the respective Bookmark fields. We click Ok to save and close Mapping Editor.

 

2016-12-20_095135

 

Back in the Flow Designer we add Download Document Form from Flows, Rules, Forms and Reports > Forms [Interactions] > [Parent Folder] > Replacing Bookmarks With Text category in the Quick Add Step dialog.

 

2016-12-20_095357

 

This Form was designed for Replacing Bookmarks With Text (Dynamic) tutorial. It has two controls. Done Button control from Actions category for closing the Form. And, Download File Download control from File Handling category.

 

2016-12-20_095451

 

Back in the Flow Designer we connect Done outcome from the Download Document Form to the End Step, and Failed outcome from the Replace Bookmarks With Text step to the End Step in our Flow. Then, we call Mapping Editor for our Download Document Form step.

 

2016-12-20_095542

 

In the Mapping Editor we connect OutputDocumentFile outcome from the Replace Bookmarks With Text step to the FileHere File Download control on the Form. Then, we save and close Mapping Editor.

 

2016-12-20_095714

 

This completes our Flow. We click Debug Flow link on the Top Panel in the Flow Designer to test our Flow.

 

2016-12-20_112550 

 

Our Invoice Form opens in the Debugger. We fill in all required fields and click Submit

 

2016-12-20_112804

 

Then, Download Document Form opens. We click Download

 

2016-12-20_112835

 

Next, we confirm download process, Name our updated Document file, and save it at the desirable location.

 

2016-12-20_112908

 

Next, we click Done on the Download Document Form in the Debugger.

 

2016-12-20_113001

 

The Form closes and Diagram Tab in the Debugger indicates that our Flow ran to the End Step with no errors.

 

2016-12-20_113040

 

Finally, we locate our downloaded file and open it. We can see that all Bookmarks were replaced with user’s data from the Invoice Form.

 

 

Additional Resources