Hi All
I have been using the below code to open Outlook and send off an email but since some of the users have updated their outlook, it doesn't work?
Dim xOutlookObj As Object
Dim xOutApp As Object
Dim xOutMail As Object
Dim xMailBody As String
On Error Resume Next
Set xOutApp = CreateObject("Outlook.Application")
Set xOutMail = xOutApp.CreateItem(0)
xMailBody = "Please find attached a new PO request. "
On Error Resume Next
With xOutMail
.To = Range("D48")
.CC = ""
.BCC = ""
.Subject = fname
.Body = xMailBody
.Attachments.Add ActiveWorkbook.FullName
Response = MsgBox("Do you want to attached details of your order?", vbYesNo)
If Response = vbNo Then .Send
If Response = vbYes Then .Display
Does anyone have any suggestions?
Thanks
Tommy
I have been using the below code to open Outlook and send off an email but since some of the users have updated their outlook, it doesn't work?
Dim xOutlookObj As Object
Dim xOutApp As Object
Dim xOutMail As Object
Dim xMailBody As String
On Error Resume Next
Set xOutApp = CreateObject("Outlook.Application")
Set xOutMail = xOutApp.CreateItem(0)
xMailBody = "Please find attached a new PO request. "
On Error Resume Next
With xOutMail
.To = Range("D48")
.CC = ""
.BCC = ""
.Subject = fname
.Body = xMailBody
.Attachments.Add ActiveWorkbook.FullName
Response = MsgBox("Do you want to attached details of your order?", vbYesNo)
If Response = vbNo Then .Send
If Response = vbYes Then .Display
Does anyone have any suggestions?
Thanks
Tommy