I need the below script to run when I create a new email in outlook. Currently it runs when I send an email but this isn’t what I want. The code I have is as follows:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
MsgBox "you have created a new message please ensure the attachment has attached"
Dim myItem As Outlook.MailItem
Dim myAttachments As Outlook.Attachments
Set myItem = Application.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments
myAttachments.Add "C:attachment.docx", _
olByValue, 1, "Test"
myItem.Display
End Sub
Any help on this would be great.