logandiana
Board Regular
- Joined
- Feb 21, 2017
- Messages
- 110
I created the following code in Outlook YEARS ago and 30+ people in our department still use this code every day with no issue. Each time we get a new employee it gets added to their machine and they are good to go.
I have 1 person where the code doesn't work for some reason. It throws the same 424 Object required error every time, as soon as it tries to process the line objDrafts.Item(i).Send
I don't know why it works on everybody elses computer including mine, but not hers. We've loaded it the same way as everybody else. We've deleted her outlook profile and reloaded everything thrice.
What can I try?
I have 1 person where the code doesn't work for some reason. It throws the same 424 Object required error every time, as soon as it tries to process the line objDrafts.Item(i).Send
VBA Code:
Sub SendDrafts()
Dim objDrafts As Outlook.Items
Dim i As Long
Set objDrafts = Outlook.Application.Session.GetDefaultFolder(olFolderDrafts).Items
For i = objDrafts.Count To 1 Step -1
If Left(objDrafts.Item(i).Subject, 17) = "Current Statement" Or Left(objDrafts.Item(i).Subject, 16) = "Missing Contacts" Then
objDrafts.Item(i).Send
End If
Next
MsgBox "Emails Sent" & vbNewLine & vbNewLine & "Have a nice day"
End Sub
I don't know why it works on everybody elses computer including mine, but not hers. We've loaded it the same way as everybody else. We've deleted her outlook profile and reloaded everything thrice.
What can I try?