Outlook email doesn’t send when computer is locked

1136685 pts.
Tags:
Excel VBA
Microsoft Outlook
VBA
I've recently been having issues with sending Outlook emails using Excel VBA. I already have my code to do it, Sendupdate, and it's working fine when it's manually run. I also have an automatic timer that's intended to execute the same email at a specific time. But when the computer is locked, it doesn't send the email. It's just hanging and I have to manually send it. Here's my code:
Sub SendUpdate()
Recipient = "x@y.com"
Subj = "update"
Dim msg As String
msg = "hello”

HLink = "mailto:" & Recipient & "?"
HLink = HLink & "subject=" & Subj & "&"
HLink = HLink & "body=" & msg
ActiveWorkbook.FollowHyperlink (HLink)
    Application.Wait (Now + TimeValue("0:00:01"))
    Application.SendKeys "%s"
End Sub

Sub StartTimer()
Application.OnTime TimeValue("18:00:00"), "SendUpdate"

End Sub
How can I send the email through automatically? Thanks!
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Harisheldon
    Check in your services and see if Outlook is set to either manual or automatic.  If set to manual, change it to automatic and see if that works.
    12,900 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: