Close other applic from Access?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form in Access 2003. the database resides on a server. 2 remote
users pull up reports in the the database, and use the form to select a
contact person in the database, then they click a button on the form which
triggers the SendObject function to create an email in Outlook (the email
program on server) attach the report, then send it. Problem is, these emails
just get stuck in the Outlook outbox. I have already adjusted the settings to
do Send/receive every 1 min and autmomatically on exit. Still not working.
How do i tell Access to close out Outlook program? i think maybe this will
force the send/receive .
-melanie
 
I've been trying to figure this one out myself. At work I am on an exchange
server, so I can programmatically open up Outlook through
Shell("OUTLOOK.EXE") (this gets by the "A program is trying to access your
inbox blah blah" message box), and then send out the email via an
OutlookObject (I don't use SendObject, instead I create an outlook email
programmatically and do a .Send with it). The problem that I'm finding is
with closing the program. I have tried sending a WM_CLOSE to Outlook but it
doesn't want to close, yet doing TerminateApp(pid) seems to work just fine
(but that doesn't close down Outlook "cleanly"). To get around it, I use
another program called AutoMate that we have up at work to kick off a process
that closes the window, but that's not the best practice solution in the
world. I'd really like to know how to close Outlook down programmatically
from Access if it's open, and I haven't found anything on the net about it.
 
hmm, well at least its not just me having this problem. what is the syntax
for using Outlook.EXE to open outlook? i also need to get around that
annoying message.
For the rest of this issue, for now, i am having to tell the 2 users to go
to outlook and press the Send/Receive button to clear out the outbox. Since
they normally dont even use the email on the server, this is an inconvenience
to them.
thanks for the input.
 
Shell "Outlook.exe"

As far as getting around the annoying message, you might not be able to do
it unless you're on an Exchange server afaik.
 
Back
Top