I found the code to take screenshot from the screen but could not figure out the way to save that screenshot to specific folder with specific name. What could be the way to achieve it ?
For Eg : Save the screenshot taken to "D:\Picture\Screenshot\First.jpg"
For Eg : Save the screenshot taken to "D:\Picture\Screenshot\First.jpg"
VBA Code:
Private Declare PtrSafe Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _
bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const VK_SNAPSHOT = &H2C
'Capture screen
Sub PrintScreen()
keybd_event VK_SNAPSHOT, 1, 0, 0
keybd_event VK_SNAPSHOT, 1, KEYEVENTF_KEYUP, 0 'Key Up
'ActiveSheet.Paste
End Sub