VBA E.mail


Posted by Ian on July 24, 2001 9:40 AM

Hi

can any one tell me how to attach a file to an e.mail triggered by a button. What I'd like is for the file to save and to send itself, from it's current path.
Also is possible to remove the button before saving??? so the recipient doesn't have it.

Ian

Posted by Mike on July 24, 2001 10:09 AM

You can attach this to a button. I would put a button on the tool bar to run it .
Application.Dialogs(xlDialogSendMail).Show , "Put subject in here this is optional", Null
ActiveWorkbook.Save
Hope this helps you.



Posted by Ian on July 24, 2001 2:33 PM

Soory,

I have a button on the sheet for ease of use to the people who have to use it (a: don't know how to put one on the toolbar b: it's not such a big deal).
with regards to the sending the mail. I've got some butchered code (unfortunatly I'm at home).
so far, When the button is Clicked I've got the code to send an e.mail to me plus a subject (which is something like "Reports "& cells(4 ,2).value (the value is the date in that cell)) and then a mainbody text "hello I'm stuck", or whatever.
I need to now workout a way to add an attachment.

by the way I'm using NT and sending the e.mail from my Outlook.

Ian.

P.s anyone want's to help I can E.mail (but not this way :) ) what I have.