Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all, i am using ActiveWorkbook.SendMail mySuppName, "Latest
Reconciliation " & myDate, True To send an e-mail and it works great, i just need to write a message, as the above only has the possibility to put in the address and the subject ? Any suggestions or help would be appreciated. Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try the following instead of send mail:
Sub email() Dim OutApp As Object Dim OutMail As Object Dim EmailAddr As String Dim Subj As String Dim BodyText As String EmailAddr = " Subj = "Your subject" BodyText = "your subject" Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) With OutMail .to = EmailAddr .CC = "" .BCC = "" .Subject = Subj .Body = BodyText .Attachments.Add ActiveWorkbook.FullName .Display 'or use .send End With Set OutMail = Nothing Set OutApp = Nothing End sub "Tempy" wrote: Hi all, i am using ActiveWorkbook.SendMail mySuppName, "Latest Reconciliation " & myDate, True To send an e-mail and it works great, i just need to write a message, as the above only has the possibility to put in the address and the subject ? Any suggestions or help would be appreciated. Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks JNW, will try it in the morning as It is now 18:45 here and way
past me home time !! thanks again. Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is only working if the OP is using Outlook
For other code see http://www.rondebruin.nl/sendmail.htm -- Regards Ron de Bruin http://www.rondebruin.nl "JNW" wrote in message ... Try the following instead of send mail: Sub email() Dim OutApp As Object Dim OutMail As Object Dim EmailAddr As String Dim Subj As String Dim BodyText As String EmailAddr = " Subj = "Your subject" BodyText = "your subject" Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) With OutMail .to = EmailAddr .CC = "" .BCC = "" .Subject = Subj .Body = BodyText .Attachments.Add ActiveWorkbook.FullName .Display 'or use .send End With Set OutMail = Nothing Set OutApp = Nothing End sub "Tempy" wrote: Hi all, i am using ActiveWorkbook.SendMail mySuppName, "Latest Reconciliation " & myDate, True To send an e-mail and it works great, i just need to write a message, as the above only has the possibility to put in the address and the subject ? Any suggestions or help would be appreciated. Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Ron, thank you very much. Just one more question, i see you can wrap
the text if you put it in the code. "This is line 1" & vbNewLine & _ "This is line 2" & vbNewLine & _ "This is line 3" & vbNewLine & _ "This is line 4" How would one wrap the text put in via an input box ? Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Use this then strbody = InputBox("Enter your text") -- Regards Ron de Bruin http://www.rondebruin.nl "Tempy" wrote in message ... Hi Ron, thank you very much. Just one more question, i see you can wrap the text if you put it in the code. "This is line 1" & vbNewLine & _ "This is line 2" & vbNewLine & _ "This is line 3" & vbNewLine & _ "This is line 4" How would one wrap the text put in via an input box ? Tempy *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
e mail same body different subject | Excel Discussion (Misc queries) | |||
Mail as body | Excel Discussion (Misc queries) | |||
Mail Sheet as message body | Excel Programming | |||
General Mail Failure with SendMail | Excel Programming | |||
default mail program -activeworkbook.sendmail | Excel Programming |