Hi,
(Office 365)
I have a macro that loops through a list of names, opens up outlook and sends the information in certain cells. However, since we switched to O365 others can't use the file without running into the "Allow" button in outlook. this does not happen for me mine go through without hesitation. I have been in and out of more sites than I can recall and have tried about a dozen things with no success. The problem with me sending the file is that they are now requiring the outgoing emails to show coming from a different address. I have access to this email but changing the default from my personal email to the group does not show the email coming from the group and using SentOnBehalfOName doesn't seem to work either. I've also tried Item.From = as well (this was a recommendation from a coworker). Below is the sub, any thoughts would be greatly appreciated.
Thanks
Private Sub Mail_Routine()
' This procedure opens Microsoft Outlook
' And based on chosen fields sends emails to the email address in cell F2
Sheets("Mail_Template").Select
Dim OutApp As Object
Dim OutMail As Object
Dim i As Long
On Error Resume Next
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
i = Range("A1").Select
' Select the range of cells on the active worksheet.
Sheets("Mail_Template").Select
ActiveSheet.Range("A1:C19").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message is sent.
With ActiveSheet.MailEnvelope
.Item.From = "UMR-SLClaims@umr.com"
.Item.To = Range("F2")
.Item.CC = ""
.Item.BCC = ""
.Item.Subject = Range("C7") & " Stop Loss Introductory Call"
.Item.Body = Range("A5")
.Item.send
' .SentOnBehalfOfName = "UMR-SLClaims@umr.com"
SentOnBehalfOfName = """SenderName"" <UMR-SLClaims@umr.com< font>>"
.send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
'MsgBox "Email Sent"
'Range("N3").Value = ""
'Range("A2:A52").Value = ""
'Range("A2").Select
End Sub
(Office 365)
I have a macro that loops through a list of names, opens up outlook and sends the information in certain cells. However, since we switched to O365 others can't use the file without running into the "Allow" button in outlook. this does not happen for me mine go through without hesitation. I have been in and out of more sites than I can recall and have tried about a dozen things with no success. The problem with me sending the file is that they are now requiring the outgoing emails to show coming from a different address. I have access to this email but changing the default from my personal email to the group does not show the email coming from the group and using SentOnBehalfOName doesn't seem to work either. I've also tried Item.From = as well (this was a recommendation from a coworker). Below is the sub, any thoughts would be greatly appreciated.
Thanks
Private Sub Mail_Routine()
' This procedure opens Microsoft Outlook
' And based on chosen fields sends emails to the email address in cell F2
Sheets("Mail_Template").Select
Dim OutApp As Object
Dim OutMail As Object
Dim i As Long
On Error Resume Next
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
i = Range("A1").Select
' Select the range of cells on the active worksheet.
Sheets("Mail_Template").Select
ActiveSheet.Range("A1:C19").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message is sent.
With ActiveSheet.MailEnvelope
.Item.From = "UMR-SLClaims@umr.com"
.Item.To = Range("F2")
.Item.CC = ""
.Item.BCC = ""
.Item.Subject = Range("C7") & " Stop Loss Introductory Call"
.Item.Body = Range("A5")
.Item.send
' .SentOnBehalfOfName = "UMR-SLClaims@umr.com"
SentOnBehalfOfName = """SenderName"" <UMR-SLClaims@umr.com< font>>"
.send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
'MsgBox "Email Sent"
'Range("N3").Value = ""
'Range("A2:A52").Value = ""
'Range("A2").Select
End Sub