МODULE «WORD»

Module Work can work with Microsoft Word documents. With this module you can create and edit documents with popular extensions as .doc, .docx, .html.

Window interface

The module window consists of three main parts, the first is the part containing the fields for creating commands and their control buttons, the second one is the table «List of commands», which will contain all added actions for working with the file, and the first part is the part where you can see the preview of the file.

![Screenshot](img/word_1.png)

The preview window allows you to view the entire loaded document in the same form as it is visible in Microsoft Word itself

The settings section consists of multiple fields the availability of which varies from the actions necessary for the operation. First three fields are most important and are always available but only two of them are necessary:

• «Path to the file» - a field with a button that opens a dialog of choosing a file. This field is designed for choosing an existing file with which you will be working with, or for entering a directory to which a new file is going to be added to. This field is necessary;

• «Action» - a drop down list with actions that you can apply to the loaded file or create a new one by specifying the directory in the «Path to the file» field. This field is also necessary;

![Screenshot](img/word_2.png)

• ● «Description» - This field is designed for convenient navigation through actions, this field should be filled with a note from the developer about the action itself. This field is not necessary.

All possible actions will be described in the next chapter.

To add an action into the «List of commands» table you need to use the «Add» button under the settings section.

![Screenshot](img/word_3.png)

After pressing the button the created action will be added to the «List of commands». To edit or delete an existing command you must select the line with the command in the command table and click «Delete» to delete or «Edit» to edit.

To change the order of actions, you need to select the action and then click «Raise» or «Lower» buttons, that are located in the right corner above the table.

![Screenshot](img/word_4.png)

## Module actions ### Create file

This action creates a file with the specified directory, name, and extension. To configure this action you need to fill the «Path to the file» field with the line of the following type «Path to the file/name of the file.extension», for example «C:/Reports/Documents/Test.docx».

![Screenshot](img/word_5.png)

### Get text

The «Get text» action allows you to scan all text from the loaded file to the variable. For configuring the action one more field appears besides the standard three – «Variable», in which the name of the variable is put (starting with the «@» symbol), in which the scanned text is going to be put in.

![Screenshot](img/word_6.png)

### Write text

Using an action, you can write existing text, for example, read from another text file, into the currently loaded file. For configuration it is necessary to fill out the «Value» field, where either a variable (starting with the "@" symbol) containing text or the text itself is entered.Please keep in mind that the text entered by this action will completely erase the existing text in the file.

![Screenshot](img/word_7.png)

### Add text

This action allows you to add text to the existing one using the necessary formatting.. All fields of the modules are open for editing. Every field is going to be described below.

«After the № symbol» - this field expects the input of an integer indicating after which character the text should be inserted (considering the space and the line break or page break characters).

![Screenshot](img/word_8.png)

«Text size» - similar to the «Font size» in Microsoft Word – sets the size of the added text. You should enter an integer or a decimal number.

«Font» - a drop down list that includes all default fonts from Microsoft Word – sets the font of the added text.

«Font color» and «Background color» – fields with a palette icon on the side, by clicking on which a color selection dialog window opens up - sets the color of the added text and its background. It is entered in the HEX color format - the hexadecimal representation of RGB (without the # symbol at the beginning).

«Теxt» - here you should put the text you want to add. ### Add line break

This action adds a line break character to the file. You don't need to fill in additional fields.

![Screenshot](img/word_9.png)

### Delete text

With this action you can delete text if you know the amount of characters and its location. For configuration you need to enter 2 integer numbers separated by a comma into the «After symbol №., quantity» field where the first number is a number of a character after which you need to delete text, and the second number is the amount of characters you need to delete.

![Screenshot](img/word_10.png)

### Export

You can change the extension of the file using this action. To configure the action, you need to select the type of file to export from the "Type" drop-down list and specify the path with the name and extension of the file in the “Output file path” field.

![Screenshot](img/word_11.png)