By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,293 Members | 1,390 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,293 IT Pros & Developers. It's quick & easy.

Send file as attachment to Outlook Express

P: n/a
Hi guys,

Anyone give me a clue why this code doesn't work
-------------------------------------
Public Function MailIt()
On Error GoTo MailIt_Err

DoCmd.SendObject acSendTable, "tblXXYY", acFormatXLS,
"wh*****@wherever.com", , , "Table update", "Message body", False
Beep
MsgBox "Table update sent as Excel file!", vbOKOnly, ""

MailIt_Exit:
Exit Function

MailIt_Err:
MsgBox Error$
Resume MailIt_Exit

End Function
---------------------------------------
activated from a macro - it simply errors out with the message "Database
couldn't save data to the file you've selected" whereas when I open tblXXX
and send it using File Send to >> Mail Recipient as Attachment Excel.xls it
does work??

Any workarounds??

JohnG
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.