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:
Recipient = "email@example.com"
Subj = "update"
Dim msg As String
msg = "hello”
HLink = "mailto:" & Recipient & "?"
HLink = HLink & "subject=" & Subj & "&"
HLink = HLink & "body=" & msg
Application.Wait (Now + TimeValue("0:00:01"))
Application.OnTime TimeValue("18:00:00"), "SendUpdate"
How can I send the email through automatically?