# <H1 align="center">МODULE «WORD»   </h1> 

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

## Window interface
<p> 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. </p>
<H1 align="center">![Screenshot](img/word_1.png)</h1> 
<p> The preview window allows you to view the entire loaded document in the same form as it is visible in Microsoft Word itself
<p> 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:
<p> •	«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;
<p> •	«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;
<H1 align="center">![Screenshot](img/word_2.png)</h1> 
<p> •	●	«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.
<p> All possible actions will be described in the next chapter.
<p> To add an action into the «List of commands» table you need to use the «Add» button under the settings section.
<H1 align="center">![Screenshot](img/word_3.png)</h1> 
<p> 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.
<p> 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.
<H1 align="center">![Screenshot](img/word_4.png)</h1>
## Module actions 
### Create file 
<p> 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».
<H1 align="center">![Screenshot](img/word_5.png)</h1>
### Get text 
<p> 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.
<H1 align="center">![Screenshot](img/word_6.png)</h1>
### Write text
<p> 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.
<H1 align="center">![Screenshot](img/word_7.png)</h1>
### Add text 
<p> 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.
<p> «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).
<H1 align="center">![Screenshot](img/word_8.png)</h1>
<p> «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.
<p> «Font» - a drop down list that includes all default fonts from Microsoft Word – sets the font of the added text.
<p> «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).
<p> «Теxt» - here you should put the text you want to add.
### Add line break
<p> This action adds a line break character to the file. You don't need to fill in additional fields.
<H1 align="center">![Screenshot](img/word_9.png)</h1>
### Delete text
<p> 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.
<H1 align="center">![Screenshot](img/word_10.png)</h1>
### Export
<p> 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.
<H1 align="center">![Screenshot](img/word_11.png)</h1>