Mail mit office 2007 verschicken
marcl
ich habe schönes Makro zum Verschicken von Mails mit Excel. Leider funktioniert es in 2007 nicht mehr so ganz.
Hier einmal der Code:
Sub mail_Stellen()
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment
Dim intRow As Integer, intRow2 As Integer, intCounter As Integer, intCounter2 As Integer
Dim strFile As String, strRecipientBcc As String, strRecipient As String, strSubject As _
String
Dim bolStatusBar
Application.ScreenUpdating = False
Application.DisplayStatusBar = True
bolStatusBar = Application.DisplayStatusBar
Set objOutlook = CreateObject(Outlook.Application)
For intCounter = 9 To 11
strRecipient = Cells(intCounter, zahl).Value & "; " & strRecipient
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(strRecipient)
objOutlookRecip.Type = olTo
.SentOnBehalfOfName = "test.de"
.Subject = "Januar"
.Body = "Sehr geehrte Damen und Herren," & vbLf & vbLf & _
objOutlookRecip.Resolve
End With
Next intCounter
Set objOutlook = Nothing
objOutlookMsg.Display
Application.StatusBar = False
Application.DisplayStatusBar = bolStatusBar
End Sub
bin für jede hilfe dankbar
Gruß
marcl