Consulting

Results 1 to 3 of 3

Thread: VBA and Outlook 2016 - .send goes directly to the Outbox.

  1. #1
    VBAX Regular
    Joined
    Jul 2004
    Location
    Sykesville, Maryland
    Posts
    53
    Location

    VBA and Outlook 2016 - .send goes directly to the Outbox.

    I have code that send email and attachments to about 500 people. My ISP has a limit of 100 email at one time.
    Currently when I run the job all the email goes immediately to the Outbox. What I want to do is have the email go to a folder where I can then copy a batch of 100 emails to the Outbox for distribution and repeat this until the 500 are sent.

    Therefore in the second line where it reads MyMail.Send (goes immediately to Outbox)
    I want MyMail.some other folder name here.
    HTML Code:
                 'This sends it!
                  MyMail.Send
    
                'Some people have asked how to see the e-mail instead of automaticially sending it.
                 'Uncomment the next line And comment the "MyMail.Send" line above this.
    
                'MyMail.Display
           
         'And on to the next one...
          MailList.MoveNext
          
     Loop
    
    'Cleanup after ourselves
     Set MyMail = Nothing
    'Uncomment the next line if you want Outlook to shut down when its done. Otherwise, it will stay running.
    
    'MyOutlook.Quit
     Set MyOutlook = Nothing
    MailList.Close
     Set MailList = Nothing
     db.Close
     Set db = Nothing

  2. #2
    Instead of sending the message, why not save it? This will put it in the drafts folder.
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

  3. #3
    VBAX Regular
    Joined
    Jul 2004
    Location
    Sykesville, Maryland
    Posts
    53
    Location
    Thank you. That is exactly what I need to do but I am not sure how to do it. Is there .save command in outlook? For example MyMail.Save

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •