Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All
I have the following bit of code which will send the excel workbook as an attachment. I have it enter in the subject and set the flag for read recipt to true but how do i enter some text into the main message body. Application.EnableAnimations = False Application.ScreenUpdating = False Range("D6").Select Userid = ActiveCell.FormulaR1C1 Range("C28").Select Addressee = ActiveCell.FormulaR1C1 Subject = "CC:PY:INFO03: " + Userid ActiveWorkbook.Title = Subject ActiveWorkbook.Subject = "EPG" Application.EnableAnimations = True Application.ScreenUpdating = True ActiveWorkbook.SendMail Addressee, Subject, True MsgBox "This form has been sent to Desk Europe. A copy is stored in your Outlook Sent Folder." On Error GoTo 0 End Sub Any ideas? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Goto Ron's site who is the master for eMailing from Excel http://www.rondebruin.nl Mistry wrote: Hi All I have the following bit of code which will send the excel workbook as an attachment. I have it enter in the subject and set the flag for read recipt to true but how do i enter some text into the main message body. Application.EnableAnimations = False Application.ScreenUpdating = False Range("D6").Select Userid = ActiveCell.FormulaR1C1 Range("C28").Select Addressee = ActiveCell.FormulaR1C1 Subject = "CC:PY:INFO03: " + Userid ActiveWorkbook.Title = Subject ActiveWorkbook.Subject = "EPG" Application.EnableAnimations = True Application.ScreenUpdating = True ActiveWorkbook.SendMail Addressee, Subject, True MsgBox "This form has been sent to Desk Europe. A copy is stored in your Outlook Sent Folder." On Error GoTo 0 End Sub Any ideas? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Below is a snippet of code I use to insert text and a range in to the
body of an email using Outlook. "Rangetohtml" is a routine that picks up the inserted range. Hope this helps. Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) With OutMail .FormDescription.OneOff = True '.FormDescription.Locked = True End With With OutMail .To = "" .CC = "" .BCC = "" .Subject = Range("Vouch_Code") & " Voucher Approval Request - Acct " & _ Application.Text(Range("Acct_1"), "####-###-####") & " - " & _ Application.Text(Range("Voucher_Amount"), "$#,###.00") & " - " & _ Application.Text(Right(Range("'Voucher Form.xls'!Prepared_by"), 6), "00####") .HTMLBody = "<br" & "Approvers see notes at bottom." & "<br<br" & _ RangetoHTML & "<br<br<br<br" & Application.Text(Range("Acct_1"), "###########") & _ "<br<br" & Application.Text(Range("Acct_2"), "###########") & "<br<br" & _ Mistry wrote: Hi All I have the following bit of code which will send the excel workbook as an attachment. I have it enter in the subject and set the flag for read recipt to true but how do i enter some text into the main message body. Application.EnableAnimations = False Application.ScreenUpdating = False Range("D6").Select Userid = ActiveCell.FormulaR1C1 Range("C28").Select Addressee = ActiveCell.FormulaR1C1 Subject = "CC:PY:INFO03: " + Userid ActiveWorkbook.Title = Subject ActiveWorkbook.Subject = "EPG" Application.EnableAnimations = True Application.ScreenUpdating = True ActiveWorkbook.SendMail Addressee, Subject, True MsgBox "This form has been sent to Desk Europe. A copy is stored in your Outlook Sent Folder." On Error GoTo 0 End Sub Any ideas? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cheers all worked a treat.
M |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
send email to each customer email in excel sheet. | Excel Discussion (Misc queries) | |||
send email from excel | Excel Discussion (Misc queries) | |||
Can't send email from Excel with CDO | Excel Programming | |||
body of email disappears when I send an email from Excel | Excel Discussion (Misc queries) | |||
send email through Excel | Excel Programming |