HTML to Word Document Step

Last Updated: 07/19/2016 Introduced in Verision: 2.0

This tutorial shows how to use Html To Word Document step. This step can be found under Data > Html category in the ToolBox in the Flow Designer. This step can be used to convert Html Document into Microsoft Word Document.

 

Example:

For this example we created a simple Html Document that looks like following in the Internet Browser.

 htmlDocument

The Html code for this Document as follows:

 htmlDocCode

We begin in the Designer Folder with clicking Create Flow button from Folder Actions panel.

 createFlow

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

 nameFlow

In the Flow Designer we use Flow Designer Wizard to add Html To Word Document step to our Flow. We expand All Steps [Catalog] > Data > Html category, select Html To Word Document step and click Add.

 addHtmlToWordStep

Next, we add Show Form step to Done outcome from the Html To Word Document step. We locate Show Form step in the Flow Designer Wizard under Favorite Steps category. This Form will have Download File control for user to be able to download converted File.

 addShowFormStep

In the resulting pop-up window we Name our Form and click Create to proceed to the Form Designer.

 nameFormAndCreate

In the Form Designer we drag Button control from Actions category in the ToolBox to the workspace, and rename this control to Done. Next, we add File Download control from File Handling category to the workspace.

 addFileDownloadControll

We configure our File Download control as following… We provide its Data Name with Name, Select its Type as Button, and provide this control with Text that will be shown on this control.

 fileDownloadConfiguration

Our Form Design should look as following. When finished, we can Save the Form and close Form Designer to return back to the Flow Designer.

 formDesignFinished

Back in the Flow Designer we use Flow Designer Wizard to connect our Form to the [End Step]…

 connectToTheEndStep

Next, we select Html To Word Document step in our Flow, and use Step Information Layer to map the Data to this step. First, we select Constant Mapping type for the File Name, and type desirable File Name in the Value box. Mention, that we use .docx file extension in the File Name value.

 nameHtmlFile

Next, we select Constant Mapping type for the HTML field, and input Html code into the Value field.

 pastHtmlCode

Then, we select our Show Form step in the Flow and map Data to this step using Step Information Layer. For the File field we use Select Value Mapping type. Next, we use Value Picker to map this Value to the Doc File outcome from the Html To Word Document step.

 mapFile

Finally, we connect Failed outcome from the Html To Word Document step to the End Step in our Flow. This completes our Flow Design. We can click Debug Flow on the Top Panel of the Flow Designer to test our Flow.

Note that in Decisions version 3.5 and higher, you’ll need to click Test Flow to access the Debugger.

3.5 Test Flow Shot

 debugFlow

Our Form opens in the Debugger and we click Download File control to download converted File

 downloadFile

Next, we confirm that we want to save the File

 saveFile

Select location for the File, Name it and Save.

 nameAndSaveFile

Decisions informs us that the File was Saved…

 fileSaved

We click Done button on our Form in the Debugger to close the Form.

 closeForm

In the Debugger Diagram we can observe that our Flow ran to the End Step with no errors.

 flowSuccess

We locate and open our Converted File… Confirm that the File looks the same as when it was opened with Internet Browser.

docFileOpened

Additional Resources