Hi all,

I want to use VBA to take a screenshot and send as an email attachment (not email body). Below code is what I've got so far. It does successfully take a screenshot and save it to the clipboard, however, it does not let me "paste" or "attach" it to the email... Any ideas?

Option Explicit
Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Public Const VK_SNAPSHOT = &H2C
Sub PrintScreen()

    keybd_event VK_SNAPSHOT, 0, 0, 0 'take screenshot
    
    Dim OutApp As Object
    Dim OutMail As Object
    
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)
    
    With OutMail
        .To = "example.test@company.com"
        .Subject = "Help & Feedback"
        .Body = "Hi"
        .Attachments.Add 'attach screenshot
        .Display
    End With

    Set OutApp = Nothing: Set OutMail = Nothing

End Sub