Close Document
Close the active document (if open).
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
save_changes | bool | False |
Create New Document
Create new document for Word application
Export To Pdf
Export active document into PDF file.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
filename | str | null | PDF to export WORD into |
param filename: | PDF to export WORD into |
---|
Get All Texts
Get all texts from active document
return: | texts |
---|
Open Application
Open the Word application.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
visible | bool | False | show window after opening |
display_alerts | bool | False | show alert popups |
param visible: | show window after opening |
---|---|
param display_alerts: | |
show alert popups |
Open File
Open Word document with filename.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
filename | str | null | Word document path |
read_only | bool | True |
param filename: | Word document path |
---|
Quit Application
Quit the application.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
save_changes | bool | False |
Replace Text
Replace text in active document
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
find | str | null | text to replace |
replace | str | null | new text |
param find: | text to replace |
---|---|
param replace: | new text |
Save Document
Save active document
Save Document As
Save document with filename and optionally with given fileformat
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
filename | str | null | where to save document |
fileformat | str, None | None | see @FILEFORMATS dictionary for possible format, defaults to None |
param filename: | where to save document |
---|---|
param fileformat: | |
see @FILEFORMATS dictionary for possible format, defaults to None |
Set Header
Set header for the active document
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
text | str | null | header text to set |
param text: | header text to set |
---|
Write Text
Writes given text at the end of the document
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
text | str | null | string to write |
newline | bool | True | write text to newline if True, default to True |
param text: | string to write |
---|---|
param newline: | write text to newline if True, default to True |