RPA.Word.Application
Close the active document and app (if open).
Arguments
Argument | Type | Default value |
---|---|---|
save_changes | bool | False |
param save_changes: | Enable changes saving on quit. (False by default) |
---|
Copy current text selection to clipboard.
Create new document for Word application
Export active document into PDF file.
Arguments
Argument | Type | Default value |
---|---|---|
filename | str | null |
param filename: | PDF to export WORD into |
---|
Find text in the document.
Arguments
Argument | Type | Default value |
---|---|---|
text | str | null |
cursor_position | CursorPosition | NO_MOVE |
copy | bool | False |
param text: | text to find |
---|---|
param cursor_position: | where to move cursor after finding text |
param copy: | copy found text into clipboard |
raises AssertionError: | if text is not found |
Get all texts from active document
return: | texts |
---|
Get the text of the current line in the document.
Get the number of lines in the document.
Move cursor horizontally from current cursor position.
Arguments
Argument | Type | Default value |
---|---|---|
characters | int | 0 |
Remember that if cursor is already at the start the cursor can't move left and if cursor is already at the end the cursor can't move right.
param characters: | characters to move |
---|
Move cursor to the end of the document.
Move cursor to end of the line on the current cursor position.
Move cursor to start of the line on the current cursor position.
Move cursor to the top of the document.
Move cursor vertically from current cursor position.
Arguments
Argument | Type | Default value |
---|---|---|
lines | int | 0 |
Remember that if cursor is already at the top the cursor can't move up and if cursor is already at the bottom the cursor can't move down.
param lines: | lines to move |
---|
Open the application.
Arguments
Argument | Type | Default value |
---|---|---|
visible | bool | False |
display_alerts | bool | False |
param visible: | Show the window on opening. (False by default) |
---|---|
param display_alerts: | Display alert popups. (False by default) |
Open Word document with filename.
Arguments
Argument | Type | Default value |
---|---|---|
filename | str | null |
read_only | bool | True |
param filename: | Word document path |
---|
Paste content from clipboard to the document's current cursor position.
Quit the application.
Arguments
Argument | Type | Default value |
---|---|---|
save_changes | bool | False |
param save_changes: | Enable to save changes on quit. (False by default) |
---|
Replace text in active document
Arguments
Argument | Type | Default value |
---|---|---|
find | str | null |
replace | str | null |
param find: | text to replace |
---|---|
param replace: | new text |
Save active document
Save document with filename and optionally with given fileformat
Arguments
Argument | Type | Default value |
---|---|---|
filename | str | null |
fileformat | str, None | None |
param filename: | where to save document |
---|---|
param fileformat: | see @FILEFORMATS dictionary for possible format, defaults to None |
Select text in current active paragraph.
Select paragraph(s) from current cursor position.
Arguments
Argument | Type | Default value |
---|---|---|
count | int | 1 |
Negative count moves cursor up number of paragraphs and positive count moves cursor down number of paragraphs.
param count: | number of paragraphs to select |
---|
Set header for the active document
Arguments
Argument | Type | Default value |
---|---|---|
text | str | null |
param text: | header text to set |
---|
Set the property of any object.
Arguments
Argument | Type | Default value |
---|---|---|
object_instance | null | |
property_name | str | null |
value | str | null |
This is a utility keyword for Robot Framework syntax to set object property values.
param object_instance: | object instance to set the property |
---|---|
param property_name: | property name to set |
param value: | value to set |
Writes given text at the end of the document
Arguments
Argument | Type | Default value |
---|---|---|
text | str | null |
cursor_position | CursorPosition | NO_MOVE |
end_of_text | bool | True |
param text: | string to write |
---|---|
param cursor_position: | where to move cursor before writing |
param end_of_text: | if True moves cursor to the end of the text before writing |