Email Macro Pauses every 40 - 50 emails

前端 未结 1 833
Happy的楠姐
Happy的楠姐 2021-01-19 03:45

I have a semi-working macro that

  1. Loops through a list of Managers
  2. Generates a email body for each manager
  3. Filters a sheet of all data
1条回答
  •  长发绾君心
    2021-01-19 04:42

    Extremely glad, yet also annoyed, to say that adding a Applitcation.Wait for 1 second to the function RangetoHTML fixed the issue.

        'Close TempWB
        TempWB.Close savechanges:=False
    
        'Delete the htm file we used in this function
        Kill TempFile
        
        Application.Wait Now + #12:00:01 AM#                 '<------ Resolved Issue
    
        Set ts = Nothing
        Set fso = Nothing
        Set TempWB = Nothing
    End Function
    

    Still curious to know what the actual issue is since I suspect that this is a work around to the actual issue. Just glad I can finally use this macro to send large distro's without it pausing every 4 minutes!

    0 讨论(0)
提交回复
热议问题