Frage zu Mail aus Access
Poul
Gesendet: 04.07.12 14:12
Betreff: RE: Frage zu Mail aus Access


Hallo Peter,

ja es ist in der selben Zeile .Body


Der Code ist:


Private Sub Befehl78_Click()
'Englische Mail an alle

Dim OutVerz As Object
Dim OutMail As Object
Dim OutMapi As New Outlook.Application

Dim CONN As Database
Dim dbs As Recordset
Dim strText As String
Const Titel = "Diagnosis strategy"


Set CONN = CurrentDb()
strText = "SELECT Mail from Tabelle1"
Set dbs = CONN.OpenRecordset(strText)

Do Until dbs.EOF

Set OutMail = CreateItem(olMailItem)
With OutMail
.Subject = Titel
.Body = Forms![txtMail Deutsch]![Text2].Text <----------------hier scheiter ich!
.To = dbs!Mail
.Attachments.Add "C:\blabla"
.Display
End With

dbs.MoveNext
Loop


Set OutVerz = Nothing
Set OutMail = Nothing
Exit Sub
End Sub

Kann es was mit der deklaration "Const" zu tun haben?

Beste Grüße
Poul
Top of the page Bottom of the page