question

ChuckColeman-7418 avatar image
0 Votes"
ChuckColeman-7418 asked thedbguy answered

From Access vba create a new email and force the new Message Window to the top

Hi, I have an Access application. When the user has an Access form open, there is a button with VBA code behind it that captures certain Access data and asks Outlook to create a new email message addressed to email address data from the form. That works fine. The problem I'm having is when Access tells Outlook to create the new email message, the Access application remains the focus and the new email shows up on the task bar. If you're not paying attention or don't know to look there, you think nothing happened. The code I have after the body of the new email is populated is:

 .Attachments.Add strHyperlinkFile
 .Display
 oApp.ActiveWindow.Activate

End With
Set oEmail = Nothing
Set oApp = Nothing

What am I doing wrong and how do I get the new email message to pop up on top of Access so the user sees it and can change any of the content of the email?

Thanks!

office-access-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

thedbguy avatar image
0 Votes"
thedbguy answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.