Avatar of Fordraiders
Fordraiders
Flag for United States of America

asked on 

force items in outbox to send outlook 2010

outlook vba

Using the following code on "thisoutlooksession" on startup to force anything in "Outbox" to send.
not working ?

Dim objItem As Object 'mailitem
Dim objPage As Page
Dim colOutboxItems As Items
    On Error Resume Next
    Set colOutboxItems = Application.Session.GetDefaultFolder(olFolderOutbox).Items
  For Each objItem In colOutlboxItems
    objItem.Delete
  Next
  Set objItem = Nothing
  Set colOutboxItems = Nothing

Open in new window



Thanks
fordraiders
Outlook

Avatar of undefined
Last Comment
Fordraiders

8/22/2022 - Mon