-
Solved: Send keys to print screen
I'm trying to copy the active form window to the cliboard so that I can paste it into another application. Doing it manually works just fine (ctrl + alt+ print screen). How do I use the "send keys method" to send to those keys? I've tried everything and I know its probably simple but I can't seem to get it to work. Here's what I have:
-
Honestly, I would caution you from using SendKeys for a number of different reasons. Mainly because they can be intercepted- the SendKeys will go to whatever window has focus, which could be a security risk, depending on what you're working on.
I suggest looking at this article that shows how to use API calls to capture a screen at the end of the article.
If you have to use SendKeys, then use:
[VBA]Sub PrintTheScreen()
Application.SendKeys "(%{1068})"
End Sub[/VBA]
-
I tired your code and it returned the following error. "Compile ERror: Method or Data member not found"
I don't know if I told you that I'm trying to copy an active form in MS Access. Is that the problem?
-
Thanx alot for that information. I used the API code and it worked like a charm. thanks again.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules