Hell all,
I have this logic that works well, but I need to copy a range of cells say B7:G38 and paste it into the body of the email.
Can anyone please assist me in getting this going, I would greatly appreciate the help, or direction.
Thanks,
Pujo
Here is what I am working with.
I have this logic that works well, but I need to copy a range of cells say B7:G38 and paste it into the body of the email.
Can anyone please assist me in getting this going, I would greatly appreciate the help, or direction.
Thanks,
Pujo
Here is what I am working with.
Code:
Private Sub CommandButton2_Click()
Dim OL As Object
Dim EmailItem As Object
Dim Wb As Workbook
ActiveSheet.Unprotect Password:="xxx"
Application.ScreenUpdating = False
Set OL = CreateObject("Outlook.Application")
Set EmailItem = OL.CreateItem(olMailItem)
Set Wb = ActiveWorkbook
Wb.Save
SigString = "C:\Documents and Settings\" & Environ("username") & _
"\Application Data\Microsoft\Signatures\*.htm"
Dim Try As String
Try = Dir(SigString)
If Try <> "" Then
SigString = "C:\Documents and Settings\" & Environ("username") & _
"\Application Data\Microsoft\Signatures\" & Try
Signature = GetBoiler(SigString)
Else
Signature = ""
End If
With EmailItem
.Subject = "Daily Crew Activity" & " " & Format(Now, "mmm-dd-yy")
strbody = "Good Morning, Please See Attached File."
.To = [EMAIL="me@me.com"]me@me.com[/EMAIL]
.Attachments.Add Wb.FullName
.HTMLBody = strbody & "" & Signature
.Display
'.Send
End With
Application.ScreenUpdating = True
Set Wb = Nothing
Set OL = Nothing
Set EmailItem = Nothing
With Application
.ScreenUpdating = True
.EnableEvents = True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="xxx"
End With
End Sub