Sendkeys from Outlook

LEXCERM

Registered User.
Local time
Today, 13:39
Joined
Apr 12, 2004
Messages
169
Hello All,

I have the following line of code ...

DoCmd.SendObject acSendQuery, stDocName, acFormatXLS, EmailAddress, , , "Outstanding Orders", "Please find, attached, your outstanding orders." & vbCrLf & vbCrLf & "Regards."

I have omitted FALSE at the end so that the message opens on screen. I have tried using SENDKEYS "%S" to automatically send the message, to no avail.

Is this possible?

I have read thread upon thread regarding ths issue of security warnings appear whereby you have to manually click "YES" to continue, but I thought that by leaving out FALSE at the end of the code and then try ALT+S when Outlook is open might do the trick.

Any ideas, apart from having to download CLICK YES or REDEMPTION etc?

Kind regards,
PAUL.
 
LEXCERM said:
DoCmd.SendObject acSendQuery, stDocName, acFormatXLS, EmailAddress, , , "Outstanding Orders", "Please find, attached, your outstanding orders." & vbCrLf & vbCrLf & "Regards."

Add True to the end of your code to make it send automatically.


DoCmd.SendObject acSendQuery, stDocName, acFormatXLS, EmailAddress, , , "Outstanding Orders", "Please find, attached, your outstanding orders." & vbCrLf & vbCrLf & "Regards.", True

This should work now.
 

Users who are viewing this thread

Back
Top Bottom