Hi, I'm not too comfortable with VBA yet but so far my first project is going well. Only one little details is missing. So I want to send a certain range of a certain excel sheet in my excel file via outlook mail. Right now the code sends the mail right away but I need it to be previewed in a new mail window. So this is my code:
Private Sub Send_Click()
Dim AWorksheet As Worksheet
Dim Sendrng As Range
Dim rng As Range
On Error GoTo StopMacro
'Remember the activesheet
Set AWorksheet = ActiveSheet
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Set Sendrng = Worksheets("Send.Mail").Range("A1:O38")
With Sendrng
' Select the worksheet with the range you want to send
.Parent.Select
'Remember the ActiveCell on that worksheet
Set rng = ActiveCell
'Select the range you want to mail
.Select
' Create the mail and send it
ActiveWorkbook.EnvelopeVisible = True
With .Parent.MailEnvelope
With .Item
.To = ""
.CC = ""
.BCC = ""
.Subject = "Board " & VBA.Date
.Send
End With
End With
'select the original ActiveCell
rng.Select
End With
'Activate the sheet that was active before you run the macro
AWorksheet.Select
StopMacro:
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
When I remove the .send section the mail is not being sent at all.
Can anyone help me out and tell me how to insert the table in a new outlook window without sending it?