Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default EMail Small Message from Excel

Hi,

I'm using Ron De Bruin's example to email a small messege as shown below;
Sub Mail_small_Text_Outlook_1()
' Is working in Office 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

strbody = "Your Apr/May team brief feedback form has yet to be returned,
please ensure that this is returned by:" & vbNewLine & vbNewLine & _
"Thank You" & vbNewLine & vbNewLine & _
"Director"

On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Team Brief Feedback Form"
.Body = strbody
.Display 'or use .Send
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub

My question is , Is it possible to include in the body of the message a
value from cell G11(which is a date), I ideally need to add this date after
"Your Apr/May team brief feedback form has yet to be returned, please ensure
that this is returned by:"

Any help is appriciated.

Respectx

Laddie
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default EMail Small Message from Excel

.Body = strbody & " date is " & Format(Range("G11").Value,"dd mmm
yyyy")

or if G11 is alraedy formatted

.Body = strbody & " date is " & Range("G11").Text

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"LaDdIe" wrote in message
...
Hi,

I'm using Ron De Bruin's example to email a small messege as shown below;
Sub Mail_small_Text_Outlook_1()
' Is working in Office 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

strbody = "Your Apr/May team brief feedback form has yet to be
returned,
please ensure that this is returned by:" & vbNewLine & vbNewLine & _
"Thank You" & vbNewLine & vbNewLine & _
"Director"

On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Team Brief Feedback Form"
.Body = strbody
.Display 'or use .Send
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub

My question is , Is it possible to include in the body of the message a
value from cell G11(which is a date), I ideally need to add this date
after
"Your Apr/May team brief feedback form has yet to be returned, please
ensure
that this is returned by:"

Any help is appriciated.

Respectx

Laddie



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default EMail Small Message from Excel

GGGGGGGGGGGGGGGGGreat.

Thanks Bob

"Bob Phillips" wrote:

.Body = strbody & " date is " & Format(Range("G11").Value,"dd mmm
yyyy")

or if G11 is alraedy formatted

.Body = strbody & " date is " & Range("G11").Text

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"LaDdIe" wrote in message
...
Hi,

I'm using Ron De Bruin's example to email a small messege as shown below;
Sub Mail_small_Text_Outlook_1()
' Is working in Office 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

strbody = "Your Apr/May team brief feedback form has yet to be
returned,
please ensure that this is returned by:" & vbNewLine & vbNewLine & _
"Thank You" & vbNewLine & vbNewLine & _
"Director"

On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Team Brief Feedback Form"
.Body = strbody
.Display 'or use .Send
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub

My question is , Is it possible to include in the body of the message a
value from cell G11(which is a date), I ideally need to add this date
after
"Your Apr/May team brief feedback form has yet to be returned, please
ensure
that this is returned by:"

Any help is appriciated.

Respectx

Laddie




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
New Questions.. message box too small Nastech Excel Discussion (Misc queries) 1 November 8th 08 07:11 PM
insert email message in excel sachin Excel Discussion (Misc queries) 2 August 15th 08 10:18 AM
Data Validation Input Message Box too small Joe Excel Worksheet Functions 2 June 9th 08 04:06 PM
Email message from Excel with Hyperlink to the file Ron de Bruin Excel Programming 0 January 15th 07 03:47 PM
Email VBA in Excel - Small Help twogoodtwo[_6_] Excel Programming 5 July 27th 06 11:00 AM


All times are GMT +1. The time now is 08:57 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"