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!

Excel-outlook

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
i need to send to mail recipient using VBA code in excel, but sending it as body of mail-not attachment, i need to send 3 graphs and one sheet, and it would also be great if i could automatically send text aswell using field values and some standard text that is the same each time. i am basically trying to send a report.

i tried to record macro of me doing above but didnt work

any ideas?


thanks

Jake
 
Try the following:-

Paste the following into a new excel module

Sub mailer()


ActiveSheet.Copy
Application.Dialogs(xlDialogSendMail).Show

End Sub

This will copy the active sheet ro a new workbook and (in my case) launch a new message in oputlook with that book attached.

Tom.
 
Tom,(anyone)

Do you know how to attach the following to the email?

To:
CC:
Subject:

Any help greatly appreciated.

Rob.

 
From Microsoft VB Help, xlDialogSendMail takes the following arguments - recipients, subject, return_receipt.

The following code will place "Recipients" in the To: box and "Subject Matter" in the Subject: box. I haven't been able to sort out the return_receipt option yet.



Sub mailer()

ActiveSheet.Copy
Application.Dialogs(xlDialogSendMail).Show "Recipients", "Subject Matter", return_receipt

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top