H
hooi
I've copied a code and made slight changes to it. When i execute the
code, Outlook waits for 'Yes' or 'No' response for sending an automatic
email, the sendkeys doesn't seem to work. What could be wrong with the
code below? Would appreciate any help rendered as I'm very new to VBA.
Thanks...
Function AutoUsageBilling()
Dim fso As Object
Set fso = CreateObject("Access.Application")
DoCmd.SendObject acSendReport, "rptAutoUsage", acFormatRTF,
"(e-mail address removed)", , , "Monthly Usage Billing", , False
fso.sleep 7000
While fso.AppActivate("Microsoft Outlook") = False
fso.sleep 1000
Wend
fso.SendKeys "{LEFT}", True
fso.SendKeys "{ENTER}", True
End Function
code, Outlook waits for 'Yes' or 'No' response for sending an automatic
email, the sendkeys doesn't seem to work. What could be wrong with the
code below? Would appreciate any help rendered as I'm very new to VBA.
Thanks...
Function AutoUsageBilling()
Dim fso As Object
Set fso = CreateObject("Access.Application")
DoCmd.SendObject acSendReport, "rptAutoUsage", acFormatRTF,
"(e-mail address removed)", , , "Monthly Usage Billing", , False
fso.sleep 7000
While fso.AppActivate("Microsoft Outlook") = False
fso.sleep 1000
Wend
fso.SendKeys "{LEFT}", True
fso.SendKeys "{ENTER}", True
End Function