Please help with Express ClickYes macro failure

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top