Consulting

Results 1 to 4 of 4

Thread: Send everything in the Draft folder

  1. #1
    VBAX Regular
    Joined
    Jun 2008
    Location
    Flowery Branch, Georgia
    Posts
    22
    Location

    Send everything in the Draft folder

    I do Excel VBA, and due to a wierd error cannot get it to send in Outlook. It will Save just fine, however. I have no clue how to do this in Outlook, but does anyone have a Sub that will take every email in the draft folder and send it?
    Thanks.
    Robert

  2. #2
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    Do you want it done from Excel or Outlook?
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  3. #3
    VBAX Regular
    Joined
    Jun 2008
    Location
    Flowery Branch, Georgia
    Posts
    22
    Location
    In Outlook. Thanks.
    Robert

  4. #4
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    [VBA]Public Sub SendAllInDraft()
    Dim ns As Outlook.NameSpace
    Dim objItm As Object
    Dim mi As Outlook.MailItem
    Set ns = Outlook.Session
    For Each objItm In ns.GetDefaultFolder(olFolderDrafts).Items
    If TypeName(objItm) = "MailItem" Then
    Set mi = objItm
    mi.Send
    End If
    Next
    End Sub[/VBA]
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

Posting Permissions

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