Anzeige
Archiv - Navigation
372to376
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
372to376
372to376
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

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

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
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

299 Forumthreads zu ähnlichen Themen

Anzeige
Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige