Re: How to write a statement or word in a doc file with colors in QTP
Here is a snippet of code that uses COM to open a word doc on the C:\ drive called test.doc and types into it PASS in green then FAIL in red.
Create a word doc called text.doc on your C:\ to test this. Then you can take the principles and use them as you need.
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Set word = CreateObject("word.application"
Set doc = word.Documents.Open("C:\test.doc"