Thema Datum  Von Nutzer Rating
Antwort
06.10.2020 11:56:44 ClaGo
Solved
06.10.2020 14:16:38 volti
NotSolved
07.10.2020 11:19:09 ClaGo
NotSolved
07.10.2020 15:41:47 volti
NotSolved
08.10.2020 14:48:54 Goetz Claude
NotSolved
08.10.2020 15:26:29 Trägheit
**
NotSolved
08.10.2020 15:41:51 Gast81327
**
NotSolved
08.10.2020 18:02:23 volti
NotSolved
08.10.2020 17:26:46 Gast9628
*
NotSolved
09.10.2020 09:17:15 Gast5782
NotSolved
09.10.2020 10:29:06 Gast63633
NotSolved
09.10.2020 11:21:15 Trägheit
NotSolved
09.10.2020 18:06:14 Trägheit
***
NotSolved
09.10.2020 18:15:11 Trägheit
**
NotSolved
09.10.2020 18:19:15 Trägheit
*
NotSolved
12.10.2020 14:51:27 ClaGo
NotSolved
12.10.2020 15:31:50 ClaGo
NotSolved
12.10.2020 16:44:05 Trägheit
**
NotSolved
13.10.2020 11:13:52 ClaGo
NotSolved
13.10.2020 11:56:36 Trägheit
NotSolved
13.10.2020 12:00:13 Trägheit
****
NotSolved
13.10.2020 15:00:26 ClaGo
NotSolved
13.10.2020 15:47:24 Trägheit
NotSolved
13.10.2020 16:09:39 Short Interrupt
NotSolved
14.10.2020 08:30:59 ClaGo
NotSolved
14.10.2020 12:58:45 Trägheit
NotSolved
14.10.2020 13:29:56 Gast71137
NotSolved
14.10.2020 13:34:34 Gast18503
NotSolved
14.10.2020 18:48:08 volti
NotSolved
14.10.2020 19:28:21 Gast75504
NotSolved
14.10.2020 21:22:46 Trägheit
NotSolved
15.10.2020 10:32:07 ClaGo
NotSolved
15.10.2020 12:14:59 Gast74427
NotSolved
15.10.2020 13:53:49 Trägheit
NotSolved
15.10.2020 14:18:23 Gast41485
NotSolved
15.10.2020 16:18:37 ClaGo
NotSolved
15.10.2020 16:37:19 Gast17356
NotSolved
16.10.2020 08:48:22 ClaGo
NotSolved
16.10.2020 09:56:53 volti
NotSolved
16.10.2020 10:42:09 ClaGo
NotSolved
16.10.2020 17:28:10 volti
NotSolved
15.10.2020 13:35:54 Trägheit
NotSolved
Rot Automatisch Email nach Kalender
16.10.2020 11:03:16 Gast34587
Solved
19.10.2020 13:03:56 ClaGo
Solved
19.10.2020 14:09:13 Gast73229
NotSolved
19.10.2020 14:34:42 Trägheit
NotSolved
21.10.2020 14:16:04 ClaGo
NotSolved
21.10.2020 14:45:03 Trägheit
NotSolved
21.10.2020 14:57:27 Trägheit
NotSolved
21.10.2020 16:07:29 Trägheit
**
NotSolved
21.10.2020 16:10:04 Gast1841
NotSolved
21.10.2020 16:11:49 Gast5396
NotSolved
21.10.2020 15:10:53 Trägheit
NotSolved
22.10.2020 08:24:49 clago
NotSolved
22.10.2020 08:58:27 volti
Solved

Ansicht des Beitrags:
Von:
Gast34587
Datum:
16.10.2020 11:03:16
Views:
620
Rating: Antwort:
 Nein
Thema:
Automatisch Email nach Kalender

Hallo,

scheint gut auszusehen.

Hier noch mal ein kleines Update, schau mal, ob das besser funktioniert. Hast Du vielleicht ein englisches Outlook, dass da was mit dem Datumsformat nicht stimmt?

Wenn das dann auch nicht passt, kannst Du mir so eine Mail als eMail zusenden.

Option Explicit
 
'Dieses Ereignis tritt auf, wenn eine oder mehrere Mails erhalten wurden
Private Sub Application_NewMail()
   
 Dim oItems As Object, oMail As Object
   
  With GetNamespace("MAPI").Folders("voltmann-khan@t-online.de").Folders("Posteingang").Items
   
'Nach ungelesenen Mails filtern
    Set oItems = .Restrict("[UnRead] = True")
    Call oItems.Sort("SentOn")                          'aufsteigend sortieren nach Datum
   
    For Each oMail In oItems
       
       If TypeOf oMail Is Outlook.MailItem Then         'Nur Mails, keine Termine
          If oMail.Subject Like "*Information MAIL*" Then
             Call SetzeTermin(oMail)                    'Termin aus Mail erstellen
             oMail.UnRead = False
          End If
       End If
    
    Next oMail
  
  End With
End Sub

Sub SetzeTermin(oMail As Object)
 Dim objHTML As MSHTML.HTMLDocument
 Dim oNode As Object, sArr() As String, iSpalte As Long
 Dim sStart As String, sEnde As String, sTime As String, sBetreff As String
 
 Set objHTML = New MSHTML.HTMLDocument
 
'Mail bearbeiten
 With oMail
   Call CallByName(objHTML, "writeln", VbMethod, .HTMLBody)
  
'Terminelemente aus der Mail-Tabelle extrahieren
   Set oNode = objHTML.DocumentElement.getElementsByTagName("TABLE")(0)
   If Not oNode Is Nothing Then

'Namen des Antragstellers  als Betreff extrahieren
      sBetreff = Split(oNode.PreviousSibling.innerText & vbCrLf, vbCrLf)(1)
      sBetreff = Split(sBetreff & " for ", " for ")(1)
      
'Zeiten extrahieren
      For iSpalte = 0 To oNode.rows(1).cells.Length - 1 'Spaltenanzahl aus zweiter Zeile ermitteln
        With oNode.rows(1).cells(iSpalte)               '2. Zeile enthält die Werte
          Select Case Trim$(oNode.rows(0).cells(iSpalte).innerText)
          Case "Startdate": sStart = Trim$(.innerText)
          Case "Enddate":   sEnde = Trim$(.innerText)
          Case "Starttime": sTime = Trim$(.innerText)
          End Select
        End With
      Next iSpalte
   
   End If
   
 End With
 
'Jetzt den Termin erstellen
 With CreateItem(1)
   .Start = DateValue(sStart) & " " & TimeValue(sTime)  'Startdatum und Uhrzeit
   .End = DateValue(sEnde) & " " & TimeValue(sTime)     'Endedatum und Uhrzeit
   .Subject = sBetreff                                  'Betreff einfügen
   .Body = "Termin für " & sBetreff                     'Body-Angaben
   .Location = "Ort nicht angegeben"                    'Ggf. Ort hinzufügen
   .Save                                                'Termin speichern
   .Display                                             'und anzeigen
 End With
End Sub

 

viele Grüße

Karl-Heinz


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
06.10.2020 11:56:44 ClaGo
Solved
06.10.2020 14:16:38 volti
NotSolved
07.10.2020 11:19:09 ClaGo
NotSolved
07.10.2020 15:41:47 volti
NotSolved
08.10.2020 14:48:54 Goetz Claude
NotSolved
08.10.2020 15:26:29 Trägheit
**
NotSolved
08.10.2020 15:41:51 Gast81327
**
NotSolved
08.10.2020 18:02:23 volti
NotSolved
08.10.2020 17:26:46 Gast9628
*
NotSolved
09.10.2020 09:17:15 Gast5782
NotSolved
09.10.2020 10:29:06 Gast63633
NotSolved
09.10.2020 11:21:15 Trägheit
NotSolved
09.10.2020 18:06:14 Trägheit
***
NotSolved
09.10.2020 18:15:11 Trägheit
**
NotSolved
09.10.2020 18:19:15 Trägheit
*
NotSolved
12.10.2020 14:51:27 ClaGo
NotSolved
12.10.2020 15:31:50 ClaGo
NotSolved
12.10.2020 16:44:05 Trägheit
**
NotSolved
13.10.2020 11:13:52 ClaGo
NotSolved
13.10.2020 11:56:36 Trägheit
NotSolved
13.10.2020 12:00:13 Trägheit
****
NotSolved
13.10.2020 15:00:26 ClaGo
NotSolved
13.10.2020 15:47:24 Trägheit
NotSolved
13.10.2020 16:09:39 Short Interrupt
NotSolved
14.10.2020 08:30:59 ClaGo
NotSolved
14.10.2020 12:58:45 Trägheit
NotSolved
14.10.2020 13:29:56 Gast71137
NotSolved
14.10.2020 13:34:34 Gast18503
NotSolved
14.10.2020 18:48:08 volti
NotSolved
14.10.2020 19:28:21 Gast75504
NotSolved
14.10.2020 21:22:46 Trägheit
NotSolved
15.10.2020 10:32:07 ClaGo
NotSolved
15.10.2020 12:14:59 Gast74427
NotSolved
15.10.2020 13:53:49 Trägheit
NotSolved
15.10.2020 14:18:23 Gast41485
NotSolved
15.10.2020 16:18:37 ClaGo
NotSolved
15.10.2020 16:37:19 Gast17356
NotSolved
16.10.2020 08:48:22 ClaGo
NotSolved
16.10.2020 09:56:53 volti
NotSolved
16.10.2020 10:42:09 ClaGo
NotSolved
16.10.2020 17:28:10 volti
NotSolved
15.10.2020 13:35:54 Trägheit
NotSolved
Rot Automatisch Email nach Kalender
16.10.2020 11:03:16 Gast34587
Solved
19.10.2020 13:03:56 ClaGo
Solved
19.10.2020 14:09:13 Gast73229
NotSolved
19.10.2020 14:34:42 Trägheit
NotSolved
21.10.2020 14:16:04 ClaGo
NotSolved
21.10.2020 14:45:03 Trägheit
NotSolved
21.10.2020 14:57:27 Trägheit
NotSolved
21.10.2020 16:07:29 Trägheit
**
NotSolved
21.10.2020 16:10:04 Gast1841
NotSolved
21.10.2020 16:11:49 Gast5396
NotSolved
21.10.2020 15:10:53 Trägheit
NotSolved
22.10.2020 08:24:49 clago
NotSolved
22.10.2020 08:58:27 volti
Solved