F(x)

更新时间:
复制 MD 格式

open

open(file, visible=False, dispatch='wps')

Description

Opens a Word document.

Parameters

file <str>: The path to the file.

visible <bool> Specifies whether the element is visible.

dispatch <str> Opens the file with Office or WPS.

Return value

Return to the Word document

Example call: rpa.app.wps.word.open

# Note: Confirm that WPS Office is installed before use.
# The following code provides an example:
word_file_path = r"D:\2_TestFileArchive\TestWord.docx"
word = rpa.app.wps.word.open(word_file_path, visible=True)

create

create(visible=False, dispatch='wps')

Description

Creates a Word document.

Parameters

visible<bool> Specifies whether the component is visible.

dispatch <str> Opens the file using Office or WPS.

Return value

Return to the <Word> document.

Example call: rpa.app.wps.word.create

# Note: Confirm that WPS Office is installed before use.
# The following code provides an example:
word = rpa.app.wps.word.create(visible=True)