Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

serienmail verschicken... was ist falsch?

Forumthread: serienmail verschicken... was ist falsch?

serienmail verschicken... was ist falsch?
30.01.2004 13:04:21
soendi
hallo zusammen!
was hab ich falsch gemacht?? :-(

Sub SendMessage()
Dim i As Integer
Dim objOutlook As Outlook.Application <<<--- ?? benutzerdef. typ nicht definiert?!?
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
' sortierung hier einfügen
For i = 15 To 100
If Cells(2, i) = "" Then Exit Sub
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(Mahnung.Cells(2, i))
.Subject = Mahnung.Cells(3, 2)
.Body = Mahnung.Cells(3, 3)
.Importance = olImportanceHigh
objOutlookRecip.Resolve
.Send
End With
Next i
Set objOutlook = Nothing
End Sub

danke für die hilfe!
soendi
Anzeige

5
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: serienmail verschicken... was ist falsch?
30.01.2004 13:43:13
AndreasS
Hallo,
Dim objOutlook As Outlook.Application muss heißen:
Dim objOutlook As Object und
Dim objOutlookMsg As Outlook.MailItem
muss heißen: Dim objOutlookMsg As Object
Gruß
AW: serienmail verschicken... was ist falsch?
30.01.2004 14:08:10
soendi
*grmpfl*
es funktioniert immer noch nicht...
hast du sonst noch ne idee??
gruss
soendi
Anzeige
AW: serienmail verschicken... was ist falsch?
30.01.2004 14:13:04
AndreasS
Hallo,
so bekomme ich zumindest keine Fehlermeldung...

Sub SendMessage()
Dim i As Integer
Dim objOutlook As Object
Dim objOutlookMsg As Object
Dim objOutlookRecip As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
' sortierung hier einfügen
For i = 15 To 100
If Cells(2, i) = "" Then Exit Sub
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(Mahnung.Cells(2, i))
.Subject = Mahnung.Cells(3, 2)
.Body = Mahnung.Cells(3, 3)
.Importance = olImportanceHigh
objOutlookRecip.Resolve
.Send
End With
Next i
Set objOutlook = Nothing
End Sub

Gruß Andreas
Anzeige
bockt noch...
30.01.2004 14:20:30
soendi
Set objOutlookRecip = .Recipients.Add(Mahnung.Cells(2, i))
(das mag excel nicht wirklich...)
kann ich irgendwie meine empfänger einbinden?? *grmpfl*
verflixtes outlook!
gruss
soendi
AW: bockt noch...
30.01.2004 14:32:28
AndreasS

Sub SendMessage()
Dim i As Integer
Dim objOutlook As Object
Dim objOutlookMsg As Object
Dim objOutlookRecip As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(0)
' sortierung hier einfügen
For i = 15 To 100
If Cells(2, i) = "" Then Exit Sub
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(Mahnung.Cells(2, i))
.Subject = Mahnung.Cells(3, 2)
.Body = Mahnung.Cells(3, 3)
.Importance = olImportanceHigh
objOutlookRecip.Resolve
.Send
End With
Next i
Set objOutlook = Nothing
End Sub

Anzeige
;

Forumthreads zu verwandten Themen

Anzeige
Anzeige
Anzeige
Anzeige
Entdecke relevante Threads

Schau dir verwandte Threads basierend auf dem aktuellen Thema an

Alle relevanten Threads mit Inhaltsvorschau entdecken

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Entdecke mehr
Finde genau, was du suchst

Die erweiterte Suchfunktion hilft dir, gezielt die besten Antworten zu finden

Suche nach den besten Antworten
Unsere beliebtesten Threads

Entdecke unsere meistgeklickten Beiträge in der Google Suche

Top 100 Threads jetzt ansehen
Anzeige