Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2009, 09:47 PM
ajetrumpet's Avatar
ajetrumpet ajetrumpet is offline MS OUTLOOK Bulk Mailing stalling after 2 minutes Windows 7 32bit MS OUTLOOK Bulk Mailing stalling after 2 minutes Office 2010
Novice
MS OUTLOOK Bulk Mailing stalling after 2 minutes
 
Join Date: Jul 2009
Location: Iowa City, IA
Posts: 11
ajetrumpet is on a distinguished road
Default MS OUTLOOK Bulk Mailing stalling after 2 minutes

hello all,



i am trying to send a bulk mailing out through outlook, and i am getting stuck after a certain period of time of sending. here is my code for the loop:
Code:
Function sendall()

'Creates a new e-mail item and modifies its properties

    Dim oNS As Object
    Dim oContacts As Object
    Dim oContactItem As ContactItem
    Dim objMail As MailItem
    Set oNS = Application.GetNamespace("MAPI")
    Set oContacts = oNS.Folders(1).Folders("Contacts")

For Each oContactItem In oContacts.Items
   If oContactItem.CompanyName = "temp" Then
      Set objMail = Application.CreateItem(olMailItem)
         With objMail
            'Set body format to HTML
            .To = oContactItem.Email1Address
            .Subject = "TEST MESSAGE FROM " & oContactItem.FullName
            .BodyFormat = olFormatHTML
            .HTMLBody = "<HTML><BODY>THIS IS A TEST MESSAGE FROM " & _ 
                                      oContactItem.FullName & "</BODY></HTML>"
            '.Display
            .Send
         End With
   End If
Next

Set oContactItem = Nothing
Set oContacts = Nothing
Set oNS = Nothing
Set objMail = Nothing

End Function
these message will send right away if i specify to "send immediately on connect" in the email options. if i don't send immediately, they pile up in the outbox and sit there. either way is fine with me, but my outlook is stalling on the send process at message #85 if i send say, 250 messages out. it always stalls around that spot. i tried placing a fake 5 second "pause" code snippet after the .send action to give outlook some time to complete the current sending before moving on to the next, but that stalls out at the same place as well. the code i tried is this:
Code:
               'PauseTime = 5
               'Start = Timer
                  'Do While Timer < Start + PauseTime
                     'DoEvents
                  'Loop
i am looking for some pointers in the right direction here as to how to solve this problem. i would appreciate any help that you all could give me on this one. thanks!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help setting up mailing labels auburn84 Word 0 03-12-2009 04:30 PM
MS OUTLOOK Bulk Mailing stalling after 2 minutes Documents Take 5 Minutes To Open Farrar Word 1 07-23-2007 02:54 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft