Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send access table directly with CDO? 1

Status
Not open for further replies.

Hanss

Technical User
Feb 15, 2001
85
CH
Is there any way of sending an Access Table (in excel format) with CDO directly without dumping it to a file first?

Kind regards,
Hanss
Zurich, Switzerland

The following code does what I want BUT can it be merged into the CDO code?

DoCmd.SendObject acTable, "Table1", "MicrosoftExcelBiff8(*.xls)", "test@gmail.com", "", "", "subject", "message", False, ""

CDO Code:

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = "me@my.com"
objMessage.To = "test@gemail.com"
objMessage.TextBody = "This is some sample message text."
objMessage.AddAttachment "c:\temp\readme.txt"
objMessage.Send


More info at:

 
No!!
At least not any way I can think of, you can't "stream" a file to the CDO object.
What you will need to do is save the file to a temporary area, send the email, then delete the temp file.

Cheers

Ben

----------------------------------------------
Ben O'Hara
David W. Fenton said:
We could be confused in exactly the same way, but confusion might be like Nulls, and not comparable.
 
Ben,

Thank you for your answer! I surmised that it would not be possible since my searching did not give me any leads.

kind regards,
Hanss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top