How to get text from opened MS Word document ?
Posted: Thu Jul 17, 2014 12:04 pm
Hi,
I am trying to get text from the MS Word document which is opened.
Actually what I am doing:
1. Open MS Word and create new document
2. Type "some words" on the document page
3. Try to verify text "some words" exists on the page
I need something like .GetText/.Text attribute but it is not available for such container:
Assert.Equals(repo.WordApp.Document.GetText(), "some words")
I have tried to do it by image validation/comparison, but it is not stable solution.
Thanks in advance,
Ostap
I am trying to get text from the MS Word document which is opened.
Actually what I am doing:
1. Open MS Word and create new document
2. Type "some words" on the document page
3. Try to verify text "some words" exists on the page
I need something like .GetText/.Text attribute but it is not available for such container:
Assert.Equals(repo.WordApp.Document.GetText(), "some words")
I have tried to do it by image validation/comparison, but it is not stable solution.
Thanks in advance,
Ostap