Action group: Word
The action inserts a header and a footer in a Word-document
Parameter | Description |
---|---|
Context | The context of an open Word-document. You can open a Word-document using the "Open document" action ("Word" action group). |
Header Type | Type of a header to be inserted. Two types are available: Upper, Footer. Upper header is placed in the top section of a page. Bottom header is placed in the bottom section of a page. |
Header text | Text to be inserted in a header. If the text is not specified, the header will display a message: "[Insert text]". |
Align text by | The type of text alignment in the footer. There are 4 options available: Left, Right, Center, Width. |
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Context | The Word document instance to which the action will be applied. | Robin.Word | Word context | Yes |
Header type | If a header is selected, then the text will be placed in the top block of the page. If the footer is selected, then the text will be placed in the bottom block of the page. | Robin.String | Yes | |
Header text | The text to be inserted into the header. If no text is entered in the header, it will default to «[Enter text]». | Robin.String | No | |
Align text by | The alignment type of the text in the header. If the parameter is empty, the text will be left justified by default. | Robin.String | No |
If the document already has the specified header, it will be overwritten with a new one.
The action does not work with locked fields in protected documents. In this case, the robot will return an error.
You have a Word-document. Insert an upper Header with the text "A.S. Pushkin" aligned by the right edge.
Document:
Use the "Open document", "Insert header and footer", "Save as", "Close document" actions.
The program robot completed successfully. The header was inserted in the desired place.
Word-document: