Hallo,
ich sende aus einem Formular heraus eine Mail:
Unter .htmlbody = ...... wird der Body zusammengesetzt. Wie bekomme ich hier einen zeilenumbruch rein? mit + vbNewLine + oder & vbNewLine &
funktioniert das irgendwie nicht
queckjunior
ich sende aus einem Formular heraus eine Mail:
Unter .htmlbody = ...... wird der Body zusammengesetzt. Wie bekomme ich hier einen zeilenumbruch rein? mit + vbNewLine + oder & vbNewLine &
funktioniert das irgendwie nicht
Quellcode
- Try
- Dim objOutlook As Object 'Outlook.Application
- Dim objOutlookMsg 'As Outlook.MailItem
- 'Dim objOutlookAttach ' As Outlook.Attachment
- ''Dim objOutlookAttach1 ' As Outlook.Attachment
- Dim empfaenger As String
- 'Erstellen der Outlook Session
- objOutlook = CreateObject("Outlook.Application")
- 'Erstellen der E-Mail
- objOutlookMsg = objOutlook.CreateItem(0)
- 'Empfänger zusammenbasteln
- empfaenger = MailketteTextBox.Text
- With objOutlookMsg
- .To = empfaenger
- .CC = ""
- .BCC = ""
- .Subject = "Kundenreklamation Projekt " & Pro_nummerTextBox.Text & " vom " & DatumDateTimePicker.Value
- .htmlbody = "Projektnummer " & Pro_nummerTextBox.Text & " Teileanzahl " & TeileanzahlTextBox.Text & " Reklamationsdatum " & DatumDateTimePicker.Value & " Reklamationsgrund " & reklamationsgrundRichTextBox.Text
- '//am Bildschirm anzeigen
- .Display()
- '.send()
- 'Attachment erstellen
- 'If RichTextBox1.Text <> "" Then 'Wenn ein Leerstring kommt gibt es einen Fehler
- ' objOutlookAttach = .Attachments.Add(RichTextBox2.Text)
- 'End If
- End With
- objOutlook = Nothing
- objOutlookMsg = Nothing
- Catch ex As Exception
- MessageBox.Show(ex.Message)
- End Try
queckjunior