Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Email Workbook - Outlook object model (attachment) - runtime error

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




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Email Workbook - Outlook object model (attachment) - runtime error


Hi JC

If the default mail program and the register settings are Ok try a repair of Office first

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JC" wrote in message ...
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Email Workbook - Outlook object model (attachment) - runtime error

Reg settings OK
Default def Outlook 2003
Done a repair

Still no good


Thanks John


"Ron de Bruin" wrote in message
...
Hi JC

If the default mail program and the register settings are Ok try a repair
of Office first

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JC" wrote in message
...
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Email Workbook - Outlook object model (attachment) - runtime error

No idea then

uninstall/Install Office again

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JC" wrote in message ...
Reg settings OK
Default def Outlook 2003
Done a repair

Still no good


Thanks John


"Ron de Bruin" wrote in message
...
Hi JC

If the default mail program and the register settings are Ok try a repair
of Office first

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JC" wrote in message
...
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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Email Workbook - Outlook object model (attachment) - runtime error

Hi Ron,

Just an update on the problem I have.

I'm getting this problem on PC's with Office 2003 Basic installed, also I
didn't mention in my original post the second line of the error which is:-

-2147024770 Automation error
The specified module could not be found

Would the `specified module' be something that's not included with office
2003 basic possibly?

I have a number of machines with this error, I was kind off hoping I
wouldn't have to uninstall & reinstall all of them!

Thanks
John



"Ron de Bruin" wrote in message
...
No idea then

uninstall/Install Office again
--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JC" wrote in message
...
Reg settings OK
Default def Outlook 2003
Done a repair

Still no good


Thanks John


"Ron de Bruin" wrote in message
...
Hi JC

If the default mail program and the register settings are Ok try a
repair of Office first

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JC" wrote in message
...
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








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Email Workbook - Outlook object model (attachment) - runtime error

Hi JC

Do you have the same problem when you use Early binding

Try
http://www.rondebruin.nl/mail/folder3/smallmessage.htm

See how you can change the macro on the bottom of the page


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JC" wrote in message ...
Hi Ron,

Just an update on the problem I have.

I'm getting this problem on PC's with Office 2003 Basic installed, also I
didn't mention in my original post the second line of the error which is:-

-2147024770 Automation error
The specified module could not be found

Would the `specified module' be something that's not included with office
2003 basic possibly?

I have a number of machines with this error, I was kind off hoping I
wouldn't have to uninstall & reinstall all of them!

Thanks
John



"Ron de Bruin" wrote in message
...
No idea then

uninstall/Install Office again
--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JC" wrote in message
...
Reg settings OK
Default def Outlook 2003
Done a repair

Still no good


Thanks John


"Ron de Bruin" wrote in message
...
Hi JC

If the default mail program and the register settings are Ok try a
repair of Office first

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JC" wrote in message
...
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






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Email Workbook - Outlook object model (attachment) - runtime error

Hi Ron,

Tried that but came up with the same error .. when getting to:-

Set OutApp = CreateObject("Outlook.Application")


Thanks
John


"Ron de Bruin" wrote in message
...
Hi JC

Do you have the same problem when you use Early binding

Try
http://www.rondebruin.nl/mail/folder3/smallmessage.htm

See how you can change the macro on the bottom of the page


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JC" wrote in message
...
Hi Ron,

Just an update on the problem I have.

I'm getting this problem on PC's with Office 2003 Basic installed, also I
didn't mention in my original post the second line of the error which
is:-

-2147024770 Automation error
The specified module could not be found

Would the `specified module' be something that's not included with office
2003 basic possibly?

I have a number of machines with this error, I was kind off hoping I
wouldn't have to uninstall & reinstall all of them!

Thanks
John



"Ron de Bruin" wrote in message
...
No idea then

uninstall/Install Office again
--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JC" wrote in message
...
Reg settings OK
Default def Outlook 2003
Done a repair

Still no good


Thanks John


"Ron de Bruin" wrote in message
...
Hi JC

If the default mail program and the register settings are Ok try a
repair of Office first

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JC" wrote in message
...
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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook Object Model via Excel -- return code after send? gary Excel Programming 1 June 11th 07 02:30 PM
Outlook - Object Model Guardian Braindeadbeachbum Excel Programming 7 May 10th 06 08:26 PM
Urgent help Runtime error ‘1004’ Method ‘SaveAs’ of object’-Workbook’ failed ????? funkymonkUK[_155_] Excel Programming 4 May 4th 06 12:56 PM
email shortcut to active workbook as an outlook attachment Neil Deinhardt Excel Programming 0 September 28th 04 08:14 PM
Email Attachment from Excel using Outlook. Pyball[_3_] Excel Programming 2 December 17th 03 07:08 PM


All times are GMT +1. The time now is 03:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"