eit09
Civil/Environmental
- Jul 8, 2009
- 183
I have used this coding bellow in the past but now I am getting a Compile error. looking for some guidance how to change this coding to get around the compile error.
Sub Sendoffice365invoice()
Dim myItem As Outlook.MailItem
Dim myolApp As Outlook.Application
Dim myRecipient As Recipient
Set myolApp = CreateObject("Outlook.Application")
Set myItem = myolApp.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments
myAttachments.Add "H:\Office 365 Invoice\Office 365 Business Premium Invoice.pdf"
myAttachments.Add "H:\Office 365 Invoice\Office 365 Exchange online plan Invoice .pdf"
With myItem
.Importance = olImportanceNormal
.Subject = "Office 365 Invoice"
.Display 'optional
End With
End Sub