GreetingsJoe
New Member
Hello everyone!
I love this place and have gained many ideas from all of your shares. I've recently been using the below macro from Run de Bruin in Excel 2010 for many months. Now with our latest upgrade to Office (Excel) 2013 it doesn't seem to work. I'm thinking it's a setting in my Outlook that is blocking Excel from accessing it? Any ideas are a big help Thanks.
I love this place and have gained many ideas from all of your shares. I've recently been using the below macro from Run de Bruin in Excel 2010 for many months. Now with our latest upgrade to Office (Excel) 2013 it doesn't seem to work. I'm thinking it's a setting in my Outlook that is blocking Excel from accessing it? Any ideas are a big help Thanks.
Code:
Sub Mail_workbook_Outlook_1()
'Working in Excel 2000-2013
'This example send the last saved version of the Activeworkbook
'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.to = "ron@debruin.nl"
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = "Hi there"
.Attachments.Add ActiveWorkbook.FullName
'You can add other files also like this
'.Attachments.Add ("C:\test.txt")
.Send 'or use .Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub