If You want to take screenshots of a application automatically using VBA in Ms Word use the below macro in Word:
It simply open the Program mentioned in Shell Command and takes the screenshot of the opened application and paste it in Word Document.
Private Declare 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 As Long = &H2C '44
Private Const VK_LMENU As Long = &HA4 '164
Private Const KEYEVENTF_KEYUP As Long = 2
Private Const KEYEVENTF_EXTENDEDKEY As Long = 1
Private Declare Sub Sleep Lib "kernel32.dll" ( _
ByVal dwMilliseconds As Long)
Sub test()
It simply open the Program mentioned in Shell Command and takes the screenshot of the opened application and paste it in Word Document.
Private Declare 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 As Long = &H2C '44
Private Const VK_LMENU As Long = &HA4 '164
Private Const KEYEVENTF_KEYUP As Long = 2
Private Const KEYEVENTF_EXTENDEDKEY As Long = 1
Private Declare Sub Sleep Lib "kernel32.dll" ( _
ByVal dwMilliseconds As Long)
Sub test()

