PDA

View Full Version : Run code when printscreen button is pressed on keyboard



Sweek
09-18-2014, 01:14 AM
Attached file will do following-

Step 1: Launch userform from word
Step 2: Provide Excel Import facility to import one by one rows of excel in some predefined format
Step 3: Hit a "Take Print Screen" button on userform
Step 4: minimize the word and take the printscreen of current desktop (whatever application is running eg. VBA Express wesite)
Step 5: Paste the screenprint in Word file with excel row1 data in some tabular format
Step 6: Auto load of row2 from excel in userform & maximize word (show userform)
Step 7: repeat from step 3
Step 8: save the file

i am able to achieve all these things but now i need to modify this workflow in following manner-
Step 1, Step 2 will remain same
from Step 3 after hitting "Take Print Screen" button word documnet should be minimized
and whenever user hits print screen on keyboard only then
code should run and take the screen print, and paste in word file all in background
so that user need not open the word again and again.
and at the end i will add some stop button


i am new to VBA so please excuse my coding standards, request to look into attached file
VBA password is MESST123

frankzappa
09-05-2015, 02:00 AM
no protection code!

gmayor
09-05-2015, 02:51 AM
It's in the message!