Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Body for e-mail using sendMail

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   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Body for e-mail using sendMail

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Body for e-mail using sendMail

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Body for e-mail using sendMail

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Body for e-mail using sendMail

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Body for e-mail using sendMail

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
e mail same body different subject Marilyn Excel Discussion (Misc queries) 3 May 11th 08 12:31 AM
Mail as body Balu Excel Discussion (Misc queries) 1 May 30th 06 04:17 PM
Mail Sheet as message body AR Excel Programming 1 November 14th 04 08:11 PM
General Mail Failure with SendMail Martin[_19_] Excel Programming 4 October 12th 04 06:33 PM
default mail program -activeworkbook.sendmail tvc Excel Programming 2 July 7th 04 05:27 PM


All times are GMT +1. The time now is 02:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"