Hi All,
I have written a macro (Word 2003) to capture the screen.
Code is as below:
Sub PrintScreen()
keybd_event VK_SNAPSHOT, 0, 0, 0
keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0
keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0
End Sub
To paste the captured screen below loop has written
Do Until A = True
PrintScreen
Selection.Paste
Loop
This code is working fine when the word document is opened, but if I opened browser when the loop is going on I'm getting below error message.
'Run Time Error:4605 - This method or property is not available because the clipboard empty or not valid '
Can someone help me to solve this issue?
Thanks