Hello to you all,
Looked in a wrong direction.
Found it and it worked. Only the reading of the file takes a while. After that the finding of the next record is very quick.
SessionID is int
SessionID = EmailStartOutlookSession("")
IF EmailSeekFirst(SessionID, emailSender, "SenderAdres@windev.com") = True THEN
WHILE Email.Out = False
TableAdd(Table, Email.Sender + TAB + Email.Subject)
EmailReadNext(SessionID)
END
ELSE
Info("No email was found")
END