views:

1015

answers:

4

I want to take the screenshot of an application and paste it in MSWord but the command {PRTSC} is not working. Can anybody help me out please. Here is the script which i have written.

Dim StrInputKey

Set WshShell=CreateObject("WScript.Shell")

SystemUtil.Run "www.google.co.in"

WshShell.SendKeys "{PRTSC}"

SystemUtil.Run "winword"

WshShell.SendKeys "^v"
+3  A: 

According to the MSDN documentation on SendKeys():

You cannot send the PRINT SCREEN key {PRTSC} to an application.

Tomalak
Can u please tell me an alternate way to take screenshot of an application and paste it in MSWord using QTP or WSH Script
A: 

Can u please tell me an alternate way to take screenshots of an application and save in MSWord.

You should be editing the question, not adding answers that don't answer it but instead are intended to clarify.
Charles Duffy
+1  A: 

WSH is not the right tool for this job. See AutoIt, and this post on using AutoIt for screen captures.

Charles Duffy
A: 

I usually use the AutoItX ActiveX which can do this pretty easily, but also look at this thread for other ways: http://www.eggheadcafe.com/software/aspnet/29185953/send-print-screen-key.aspx

mrTomahawk