当提醒被触发时,我使用VBA代码(已联机)通过Outlook发送电子邮件。当Windows被锁定时,它无法触发。当窗口被锁定时,有没有办法调用它(可能使用VBScript或批处理)?
这是"http://www.slipstick.com/developer/send-email-outlook-reminders-fires/“中的代码
Private Sub Application_Reminder(ByVal Item As Object)
Dim objMsg As MailItem
Set objMsg = Application.CreateItem(olMailItem)
If Item.MessageClass <> "IPM.Appointment" Then
Exit Sub
End If
If Item.Categories <> "Away Time Alert" Then
Exit Sub
End If
objMsg.To = Item.Location
objMsg.Subject = Item.Subject
objMsg.Body = Item.Body
objMsg.Send
Set objMsg = Nothing
End Sub我对这个编程一无所知。
终极目标-
我希望任务计划程序在Windows被锁定(登录然后锁定)的时间超过60分钟时运行脚本,该脚本将运行Outlook宏向我发送电子邮件(当windows仍处于锁定状态时)。
发布于 2017-01-08 02:54:28
当windows被锁定时,outlook无法进行身份验证。改为尝试对远程服务器进行身份验证的CDO消息。您必须知道您使用的SMTP服务器的端口。
http://www.paulsadowski.com/wsh/cdo.htm
https://stackoverflow.com/questions/41037404
复制相似问题