Return focus to Word 2007 after launching from msAccess

S

slickdock

Here is the code that is in my MSACCESS 2002 module:

wd.Visible = True
wd.Application.ScreenUpdating = True
wd.Application.Activate

The code activates the Word document screen and leave the cursor ready to
type on the Word screen. The code runs fine on any machine that uses Word
versions PRIOR to 2007. But when I use the same code with machines that use
Word 2007, the Word doc becomes visible and the cursor is visible, but you
have to manually click with the mouse in the Word doc before you can start
typing. If you start typing before you click with the mouse in the Word doc,
it turns out that msAccess is still holding the focus, because when you start
typing, you are typing on the msAccess form that was on the screen when the
code started running.

THanks for help.
 
P

Pesach Shelnitz

Hi,

Try adding the following line after the lines that you posted.

wd.Application.ScreenRefresh

If this doesn't work, please include all the code for creating your wd
object when you write back.
 

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