This blog outlines how to do scripting for test cases that involve editing of word documents or verification of the contents of a word document. The script would need to have:
1 |
require 'win32ole' |
To open an MS word document:
1 2 |
@word = WIN32OLE.new('Word.Application') document = @word.Documents.Open('C:HelloWorld.docx') |
The Range(x,y) specifies the place at which text will be inserted. “.Text” allows to insert text…
Read more