send xl file thru email


Posted by Stacy on April 06, 2001 11:00 AM

Hello...I am trying to email an excel workbook through vba....I am using the line:

ActiveWorkbook.SendMail "yourname@provider.com"

I use Lotus Notes....and it worked fine the first few times....now I am getting an error that says, "Run time error 1004: Method of 'SendMail' of object '_Workbook' failed." Does anyone have any suggestions on this? Is there any other code I could use that would make it work??

Thanks in advance!!

Stacy

Posted by Stacy on April 06, 2001 11:03 AM

I have also tried on other PC's and it just completely skips the line on them...no error, no email, no nothing.....humm.



Posted by Sue Kerrigan on May 03, 2001 7:53 AM

Private Sub Email_Click()

Worksheets("SHEET 1").Select
Worksheets("SHEET 1").Range("A1").Select

Worksheets("SHEET 1").Copy
Application.Dialogs(xlDialogSendMail).Show
ActiveWorkbook.Close SaveChanges:=False
End Sub


LET ME KNOW IF IT WORKS FOR YOU TOO

SUE