Elsewhere in this board, I found a reference to http://www.rondebruin.nl/sendmail.htm which taught me to attach an Excel workbook to an email. And using the code below, it worked perfectly... except - Outlook creates a box before it sends asking the user to "allow" or deny permission to send the document. Is there any way to turn this off and just default to "Allow"?
If Val(Application.Version) >= 12 Then
'The code 51 represents the enumeration for a macro-free Excel 2007 Workbook (.xlsx).
If wb.FileFormat = 51 And wb.HasVBProject = True Then
MsgBox "There is VBA code in this xlsx file that will be removed if you try to send this file." & vbNewLine & _
"Save the file first as xlsm and then try the macro again.", vbInformation
Exit Sub
End If
End If
On Error Resume Next
For I = 1 To 3
wb.SendMail "Me@mycompany.com", _
"Request For Assistance - " & NARNumber
If Err.Number = 0 Then Exit For
Next I
On Error GoTo 0
If Val(Application.Version) >= 12 Then
'The code 51 represents the enumeration for a macro-free Excel 2007 Workbook (.xlsx).
If wb.FileFormat = 51 And wb.HasVBProject = True Then
MsgBox "There is VBA code in this xlsx file that will be removed if you try to send this file." & vbNewLine & _
"Save the file first as xlsm and then try the macro again.", vbInformation
Exit Sub
End If
End If
On Error Resume Next
For I = 1 To 3
wb.SendMail "Me@mycompany.com", _
"Request For Assistance - " & NARNumber
If Err.Number = 0 Then Exit For
Next I
On Error GoTo 0