Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm using Ron de Bruin's "Mail the whole workbook" macro to attach the current excel workbook to an email and let you write a message before sending. It works fine on office 2007 & some office 2003 PC's but a couple of 2003 machines are displaying:- Run-time error `-2147024770 (8007007e)' when getting to Set OutApp = CreateObject("Outlook.Application") I have followed http://www.rondebruin.nl/mail/problems.htm and searched various post which mostly say "uninstall & reinstall office" There are no missing references in the VBA editor Anyone had this before?? Thanks John Sub Mail_workbook_Outlook_1() 'Working in 2000-2007 'This example send the last saved version of the Activeworkbook Dim OutApp As Object Dim OutMail As Object Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .To = " .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") .Display End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Outlook Object Model via Excel -- return code after send? | Excel Programming | |||
Outlook - Object Model Guardian | Excel Programming | |||
Urgent help Runtime error ‘1004’ Method ‘SaveAs’ of object’-Workbook’ failed ????? | Excel Programming | |||
email shortcut to active workbook as an outlook attachment | Excel Programming | |||
Email Attachment from Excel using Outlook. | Excel Programming |