Forum Discussion
sbkeenan
15 years agoFrequent Contributor
Hi Peleg
I've never used TestComplete with Microsoft Word, but having had a brief look just now, I have come up with the following :
Aliases.Sys.Process("WINWORD").Form("Document1 -").Window("_WwF", "", 1).Panel("Document1").Panel("Microsoft Word Document").NativeObject.Document.Content
You'll excuse the fact that nothing has been mapped, hence the long winded text above, but, essentially, the Content property shows the text within my test document, as shown in the attached image.
I have also seen other properties, e.g.Sentence, etc. that you may find useful. However, I haven't yet had time to look at any methods for searching the document text for a specific instance of text. If I do, I'll post what I find.
Hope this has been of some use!!
Regards
Stephen.
I've never used TestComplete with Microsoft Word, but having had a brief look just now, I have come up with the following :
Aliases.Sys.Process("WINWORD").Form("Document1 -").Window("_WwF", "", 1).Panel("Document1").Panel("Microsoft Word Document").NativeObject.Document.Content
You'll excuse the fact that nothing has been mapped, hence the long winded text above, but, essentially, the Content property shows the text within my test document, as shown in the attached image.
I have also seen other properties, e.g.Sentence, etc. that you may find useful. However, I haven't yet had time to look at any methods for searching the document text for a specific instance of text. If I do, I'll post what I find.
Hope this has been of some use!!
Regards
Stephen.