Webinar

November 3rd, 2021 12:00 PM EDT
Automation for Field Services & DistributionNovember 3rd, 2021 12:00 PM EDT
Learn how creating a digital workforce can improve your supply chain processes!

Word.Application is a library for controlling a Word application.

Examples

Robot Framework

*** Settings ***
Library                 RPA.Word.Application
Task Setup              Open Application
Suite Teardown          Quit Application

*** Tasks ***
Open existing file
    Open File           old.docx
    Write Text          Extra Line Text
    Write Text          Another Extra Line of Text
    Save Document AS    ${CURDIR}${/}new.docx
    ${texts}=           Get all Texts
    Close Document

Python

from RPA.Word.Application import Application

app = Application()
app.open_application()
app.open_file('old.docx')
app.write_text('Extra Line Text')
app.save_document_as('new.docx')
app.quit_application()