Ich hab folgendes MAkro gefunden!
ActiveSheet.Copy
Sub mail()
ActiveWorkbook.SendMail "autohaus@toyota-mittweida.de", "Eine Testmail"
End Sub
Wie kann ich nun noch was in den Body der Mail schreiben
Danke schonmal
Steffen
Ich hab folgendes MAkro gefunden!
ActiveSheet.Copy
Sub mail()
ActiveWorkbook.SendMail "autohaus@toyota-mittweida.de", "Eine Testmail"
End Sub
Wie kann ich nun noch was in den Body der Mail schreiben
Danke schonmal
Steffen
Probiers mal so:
Application.ScreenUpdating = False
Application.DisplayStatusBar = True
bolStatusBar = Application.DisplayStatusBar
Set objOutlook = CreateObject("Outlook.Application")
strRecipient = "autohaus@toyota-mittweida.de"
strFile = "Hallo! Bitte tragen Sie mir die Preise zur Anfragenummer " & AnfrgNr & " in die Datei 'Materialanfragen.xls' ein!"
Application.StatusBar = "Sende Datei " & strFile & " an " & strRecipient
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(strRecipient)
objOutlookRecip.Type = olTo
.Subject = strSubject
.Body = strFile
objOutlookRecip.Resolve
.Send
End With
Set objOutlook = Nothing
Application.StatusBar = False
Application.DisplayStatusBar = bolStatusBar
Bitte nochmal Hilfe
Danke Steffen