Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Sending Email using CDO ERROR

Hi Jake

This looks like the problem.
I hope we hear from Todd

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Jake Marx" wrote in message ...
Todd,

That sounds like a CDO installation/configuration error. Here's a link that
may help (watch line wrap):


http://groups.google.com/groups?hl=e...3DN%26tab%3Dwg

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Todd Huttenstine wrote:
http://www.rondebruin.nl/cdo.htm#sheet

I went to the above site and tried various codes. I kept
getting the same error on each code I tried to use. see
error below....

"Run-Time error '-2147024770(8007007e)':
Automation error
The specified module could not be found."

When I click debug, the following part of the code is
highlighted.

" Set iMsg = CreateObject("CDO.Message")"

Here is the entire code below.

Sub CDO_Send_Workbook()
' This sub use late binding, you don't have to set a
reference
' It is not working in Windows 98 and ME.
' You must be online when you run the sub

Dim iMsg As Object
Dim iConf As Object
Dim WB As Workbook
Dim WBname As String

Application.ScreenUpdating = False
Set WB = ActiveWorkbook
'If you want to mail the workbook where the code is
placed you must use
'Set WB = ThisWorkbook

WBname = WB.Name & " " & Format(Now, "dd-mm-yy h-mm-
ss") & ".xls"

WB.SaveCopyAs "C:/" & WBname
' It will save a copy of the file in C:/ with a Date
and Time stamp

Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
With iMsg
Set .Configuration = iConf
.To = "
.From = """Ron"" "
.Subject = "This is a test"
.TextBody = "Hi there"
.AddAttachment "C:/" & WBname
'.AddAttachment "C:/Test.txt"
' You can add any file you want
with .AddAttachment "C:/Test.txt"
.Send
End With
Kill "C:/" & WBname 'If you not want to delete the
file you send delete this line
Set iMsg = Nothing
Set iConf = Nothing
Set WB = Nothing
Application.ScreenUpdating = True
End Sub


Any ideas?

Thanx
Todd




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
Sending a group email Newbee Excel Worksheet Functions 9 February 11th 10 05:47 PM
Getting #name? error in cells after sending spreadsheet via email rexie3 Excel Worksheet Functions 6 December 5th 08 08:12 PM
Sending a Spreadsheet as an Email Attachment vs. Imbedded in Email billbrandi Excel Discussion (Misc queries) 1 April 3rd 08 03:44 AM
error sending email (as attachment) from within Excel 2000 Plasticgeek Excel Discussion (Misc queries) 0 December 17th 07 03:36 PM
Email sending colourp Excel Discussion (Misc queries) 1 January 13th 06 01:13 AM


All times are GMT +1. The time now is 06:52 AM.

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"