| || |
UFT 11.52 - write to a wordpad
I've to write the contents from clipboard to a wordpad & save the file in rtf format.
I've to do this, since, the PC doesn't have MS Office installed.
Any idea how to do this?
You'll need to resort to using VBScript. The File System Object ("Scripting.FileSystemObject") will have everything you need to complete this.
You can use other languages to achieve this as well, but VBScript seems like the lowest-hanging fruit here.
Basically, you'll need to create the file and then stream the contents of the clipboard into the newly-created file, and close it (assuming that nothing else is to be done with it after the population is complete).
There are plenty of code samples and snippets on how to do stuff like this on this forum and on other sites, so you shouldn't have any trouble in finding something now that you know what to look for.
You'd want to create the File System Object ("Scripting.FileSystemObject") and use the methods and properties associated with it to create the file and stream the content stored within the clipboard into it.
With this in mind, you should be able to find a wealth of code samples on SQAForums and other sites. I hope this helps!