By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,192 Members | 1,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,192 IT Pros & Developers. It's quick & easy.

Outlook Message Does Not Always Display From Access VBA Application

P: 2
I have an access 2007 vba application that creates and displays an email before sending. Display is done using .DISPLAY Most of the time it works as expected, the outlook message displays on the screen, the user edits and sends it, and control returns to the Access form. But, sometimes the outlook message does not pop up to the user. The user has to look around in their task bar at the bottom of the screen to find the new message. They find it there, click on it to activate it,send it, and then control returns to access form. It seems to happen randomly. Outlook is already open and it doesn't seem to matter where they were in outlook.

Do I need to add code to activate the new mail item in addition to .display ? What would this code be? Also, if I do this, would control return to my Access application after user sends the message?
Apr 27 '10 #1
Share this Question
Share on Google+
2 Replies

P: 2
problem resolved using these steps:
1. get window handle id of outllook message window using inspector caption
2. setforeground window using window handle id found in step 1
3. do showwindow

just using .activate or .display did not work - because sometimes message screen went to task bar rather than popping up
May 7 '10 #2

Jim Doherty
Expert 100+
P: 897
At the very least can I say thankyou reko for posrting your own solution others benefit from that kind of involvement with Bytes
May 9 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.