LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 163
Default Excel Emailing issue 2003

Hi all Gurus,

below is code to email the email address of cell l11 when a button is pressed.

What i would like it to do is place in the body of the email, text to say,
"PIP submission for Cell B11 and today's date."

Can someone please help!! : )

Sub Button29_Click()

Dim Response As String
Dim DefaultFolder As String, DefaultFileName As String
Dim FileToSave
Dim OutApp As Object 'this emails operations manager
Dim OutMail As Object
Dim strbody As String
Dim myRange As Range
'Dim OutApp As Object
'Dim OutMail As Object




Response = MsgBox("Are you sure you want to save the PIP report?", _
vbYesNo + vbInformation + vbDefaultButton2)

If Response = vbYes Then

strbody = "PIP" & " for " & Sheets("PIP").Range("A14").Value & " " & _
Sheets("PIP").Range("B13").Value & " " & "Ready For Review"
' Working in Office 2000-2010

With Application
.EnableEvents = False
.ScreenUpdating = False
End With

Set OutApp = CreateObject("Outlook.Application")

For Each ws In ActiveWorkbook.Worksheets
If ws.Range("L11").Value Like "?*@?*.?*" Then
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next
With OutMail
.To = ws.Range("L11").Value
.CC = ""
.BCC = ""
.Subject = "PIP Submission"
'.HTMLBody =

'RangetoHTML (ws.UsedRange)
'You can add a file like this
'.Attachments.Add ("C:\test.txt")
.Send 'or use .Display
End With
On Error GoTo 0

Set OutMail = Nothing
End If
Next ws

Set OutApp = Nothing
With Application
.EnableEvents = True
.ScreenUpdating = True
End With

End If
End Sub


 
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
Emailing in excel 2003 Neil Holden Excel Discussion (Misc queries) 2 February 26th 10 04:49 PM
Emailing in excel 2003 Neil Holden Excel Discussion (Misc queries) 5 February 6th 10 11:47 PM
Emailing in excel 2003 Neil Holden Excel Discussion (Misc queries) 0 January 28th 10 04:20 PM
Emailing in excel 2003 Neil Holden Excel Discussion (Misc queries) 1 January 28th 10 11:53 AM
How to emailing file from Excel 2000 to 2003, cannot open?? bennyw0528 Excel Discussion (Misc queries) 2 November 1st 05 10:37 PM


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