on 02-07-2007 8:20 PM
Hello,
I need a full bitmap image of SAPGUI screens for our audit department. I have been using a combination of Windows Scripting and SAPGUI Scripting. The one issue I am have is that I can't send the "Print Screen" key using the SendKeys Method in WSH. I want to paste the image directly into MS Word. (which I already can do, if I just had the image on the clipboard). Can someone tell me how I can get a SAPGUI screen shot to the clipboard programmatically? (or if someone knows a SAPGUI control code that might solve my issue also).
Thanks,
Jason Wierek
Hi Jason,
There are 2 functions for taking screenshots available via sapgui scripting api ().
The GuiMainWindow object exposes
- HardCopy (writes hardcopy into bmp file )
- HardCopyToMemory (returns the hardcopy as memory block to caller)
A) Using that sapgui scripting api function HardCopy you can assign path and filename for your screenshot.
To load the bmp from file into word, you could try to use Words scripting API, (but I do not know whether MS exposes to Insert->Picture->FromFile function).
B) On the other hand you could try to use HardCopyToMemory from any vb script and use some API functions microsoft might provide for clipboard access.
Best regards
Jens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.