ich bin noch nicht so fit mit VBA aber dank der HIlfe des Forums konnte ich schon einiges lernen. Aktuell komme ich nicht weiter mit dem folgenden Problem: Ich möchte einen bestimmten Bereich eines anderen Sheets per VBA Marko über Outlook versenden. Aktuell kann ich das Ganze zwar senden, ich möchte aber unbedingt, dass sich das Mail Fenster öffnet und ich noch den Text anpassen kann etc. und die Mail nicht gleich versandt wird.
So sieht der Code bisher aus, der teilweise in diesem Forum zur Verfügung gestellt wurde:
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
Kann mir jemand sagen, was ich genau anpassen muss, damit ich erst die Vorschau in Outlook bekomme und ggf. Text etc. noch anpassen kann? Wenn ich die .send Sektion entferne, dann passiert leider gar nichts mehr :(