Changing Active Window

mrgreen

Registered User.
Local time
Yesterday, 16:57
Joined
Jan 11, 2008
Messages
60
Hopefully this is the right section. I have some code that automatically generates an email in Outlook and I'm not smart enough to get around having to click the "Yes" button notifying the user he/she is going to send an email so whats the best way to put the focus back on my Access form? After the email is sent as the focus is staying in Outlook. Any suggestions would be wonderful!
Thanks
 
Not sure if what you want to do is possible. Would it be better if you simply turned the warnings off in outlook (then there is no popup). Alternatively put something like this in your code:

Code:
With objOutlook '(or whatever you called the outlook object)
        .DisplayAlerts = False 
end with
 
well, technically you should be closing the outlook object if you are opening it in code. If you're not, I'm sure you could use something like:

Code:
application.visible = true
or maybe, simply make outlook invisible? Don't quote me, but I believe windows remembers the stacking order of the windows based on the z index of them that is created. Not sure though.
 
Could you post your code please?

This should fixya:

Code:
With objOutlook
        .visible = false
        .diplayalerts = false
end with
 
Outlook doesn't have a DisplayAlerts. I'll check it out but from my research I need to install 3rd party material to remove the popup. I was just hoping Access had a Windows function similar to Excel. Oh Well. Thanks for the help.
 
There is special code for bypassing this dialog box. Do a search for it here.

Try this link
 

Users who are viewing this thread

Back
Top Bottom