Login   /   Register

Print text files using QTP

Rate this article
     0 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 5
Loading ... Loading ...
April 1st, 2008 by daniva

You don’t need Microsoft Word just to print a few text files. Instead, you can use the Shell object – which is built right into the operating system – to print text files. And what’s cool about this is the fact that you can print these files even though the Shell object doesn’t have a Print method.

You can do this is because the Shell object has a method called InvokeVerbEx that lets you perform the tasks that show up when you right-click a file in Windows Explorer. Right-click one of your text files, and look at the context menu that pops up. You should see things like Open, Print, Edit, Cut, Copy, Delete, etc. The Shell object lets you perform all those tasks programmatically.

The content you are accessing is for registered users only
Registeration is FREE, quick and private.
You can either Register or Login if you have already registered

Posted in VBScript

One Response to “Print text files using QTP”

  1. pduddala Says:

    [-]

    let me test in QTP and rate it.
    anyway thanks it gives some clue.

Leave a Reply

You must be logged in to post a comment.

This article was viewed 453 times