View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
hommer hommer is offline
external usenet poster
 
Posts: 7
Default email as attachment in code

Hi, all!
I have a program that inserts data into excel worksheet.
Now I want to email it. I need your help to find the code equivalent of
manually select menu File/SendTo/Mail Recipient(As Attachment), then type in
a recipient address and send.
I have this line of code:
Call ", "ACD", "")
I got runtime error 1004. Method 'SendMail' of object '_workbook' failed.
I am not sure I am using the right object. I have app, workbook and
worksheet, and I used workbook to save it.
Thanks!