I have not used Outlook for several years, so have no way to test/experiment.
Do you have olkNS dimmed anywhere?
I have formatted your code and placed it within Code tags for readability.
Code:
Private Function FindSentItem(itemID As String, sentFromTime As Date) As Outlook.mailItem
Const MAX_TRY_COUNT = 3
Const SLEEP_TIME = 1000
Dim items As Outlook.items
Dim item As Object
Dim attempt As Integer
attempt = 1
findSentItem_start:
With olkNS.GetDefaultFolder(olFolderSentMail) '******** Here is where its having a antrum**************** runtime error 424 ?
Set items = .items.Restrict("[SentOn] >= '" & Format(sentFromTime, "ddddd h:nn AMPM") & "'")
For Each item In items
If TypeName(item) = "MailItem" Then
If item.Categories = itemID Then
Set FindSentItem = item
Exit Function
End If
End If
Next item
End With
'
' If not found at this attempt, try again
' after some sleep
'
If attempt < MAX_TRY_COUNT Then
attempt = attempt + 1
Call Sleep(SLEEP_TIME)
GoTo findSentItem_start
End If
Set FindSentItem = Nothing
End Function