Sending Object- I Do Not want to edit

R

Robert_DubYa

My company uses Lotus Notes as it's email system. I want to send query
results automagicaly. I am using the following statement, but it only opens
in edit mode and I just want the email to go out automatically. Is this
because we Lotus Notes as email?


Private Sub cmdRun_Click()

DoCmd.SendObject acSendQuery, "qryTest1",
acFormatXLS, "(e-mail address removed)", , , "Test Email Access", "Check
this
out: I learned to email out of Access", False

End Sub

Now I have thought about using the sendkeys command after this but I don't
know how to send the alt key and thought it is not the best way anyhow.

Any help is apperciated.

Robert
 
R

Rick Brandt

Robert_DubYa said:
My company uses Lotus Notes as it's email system. I want to send
query results automagicaly. I am using the following statement, but
it only opens in edit mode and I just want the email to go out
automatically. Is this because we Lotus Notes as email?


Private Sub cmdRun_Click()

DoCmd.SendObject acSendQuery, "qryTest1",
acFormatXLS, "(e-mail address removed)", , , "Test Email Access",
"Check this
out: I learned to email out of Access", False

End Sub

Now I have thought about using the sendkeys command after this but I
don't know how to send the alt key and thought it is not the best way
anyhow.

Any help is apperciated.

Robert

It probabaly is caused byt the fact that you are using Lotus Notes. The
final "False" in your statement is what should tell SendObject to send the
message in the background. Notes might not allow that as a security
feature.
 
R

Robert_DubYa

Thanks Rick,

I went ahead anyways and used the send keys function to push the email out.
It works, so I suppose it's good. Thanks for your input.

Robert
 
D

dbahooker

if you just used Access Data Proejcts; then you could send email from
the DATABASE SERVER

it's a lot better; you can include SQL Results in an email; and it's
not a security risk or a PITA on each desktop
 
T

Tony Toews [MVP]

Robert_DubYa said:
I went ahead anyways and used the send keys function to push the email out.
It works, so I suppose it's good. Thanks for your input.

SendKeys is rather dangerous in that if somehow some other program takes focus away
from Access that program will receive the keystrokes. Also your code might not work
well for a different version of Lotus Notes.

I'd suggest visiting Microsoft Access Email FAQ - Lotus Notes
http://www.granite.ab.ca/access/email/lotusnotes.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top