S
sduraybito
Hi,
I user Express ClickYes to automate mailing several hundred email
messages. Lately, my messages have failed after 50 or so messages go
out. I get an error message that Microsoft Outlook has encountered an
error. When I click through the message, my VBAProject.OTM is
terminated so I can't see what part of my macro failed. Here is my
macro code:
Sub ClearOutbox()
Dim objFolder As Outlook.MAPIFolder
Dim objOutItems As Outlook.Items
Dim objItem As Object
Dim lngItemCount As Long
Dim lngLoopCounter As Long
Set objFolder =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderOutbox)
Set objOutItems = objFolder.Items
lngItemCount = objOutItems.Count
For lngLoopCounter = lngItemCount To 1 Step -1
Set objItem = objOutItems.Item(lngLoopCounter)
objItem.Display
objItem.Send
Next
End Sub
How do I troubleshoot why my Express ClickYes macro fails?
Thanks,
Peter
I user Express ClickYes to automate mailing several hundred email
messages. Lately, my messages have failed after 50 or so messages go
out. I get an error message that Microsoft Outlook has encountered an
error. When I click through the message, my VBAProject.OTM is
terminated so I can't see what part of my macro failed. Here is my
macro code:
Sub ClearOutbox()
Dim objFolder As Outlook.MAPIFolder
Dim objOutItems As Outlook.Items
Dim objItem As Object
Dim lngItemCount As Long
Dim lngLoopCounter As Long
Set objFolder =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderOutbox)
Set objOutItems = objFolder.Items
lngItemCount = objOutItems.Count
For lngLoopCounter = lngItemCount To 1 Step -1
Set objItem = objOutItems.Item(lngLoopCounter)
objItem.Display
objItem.Send
Next
End Sub
How do I troubleshoot why my Express ClickYes macro fails?
Thanks,
Peter