Gesendet: 24.02.22 16:44 Betreff: RE: Methode oder Datenobjekt nicht gefunden, an der Stelle .Session
Member
Beiträge: 6
Ist gelöst:
Private Sub cmdEmailSuchen_Click()
Dim oOL As New Outlook.Application 'Verweis auf MS Outlook- Library setzen
Dim oT As Outlook.Table
Dim strFilter As String
Dim oRow As Outlook.Row
strFilter = "[Subject] = '" & Me!Subject & "'"
Set oT = oOL.Session.GetDefaultFolder(olFolderSentMail).GetTable(strFilter)
Do Until oT.EndOfTable
Set oRow = oT.GetNextRow
' Debug.Print oRow.Item("Subject"), oRow.Item("entryID")
Me.EntryID = oRow.Item("entryID")
Me.Requery
Loop
Set oRow = Nothing
Set oT = Nothing
Set oOL = Nothing
End Sub