Q maintaining focus on the active doucment when using global userf

P

Peter

I have a VBA addin which displays several modeless (floating) userforms
providing buttons to help people mark assignments in Microsoft Word.
Functions include inserting predefined comments, defining new comments,
Googling the selected text, highlighting all occurrences of the selected text
etc. The addin is loaded into the startup folder so it is available whenever
any Word document is opened and the userforms are displayed in Word 2003 by
using the View menu > Showing a toolbar > showing the userforms. In Word 2007
they are displayed by using the Add-in tab to show the userforms.

All this is working well and you can see a demo at:
http://www.baker-evans.com/emarking-assistant/movies/using/
and a trial is available for download from
http://emarking-assistant.baker-evans.com

The problem is that if I show the userforms from one word doucment and then
open another word doucment and click on the userform to do something the
action is applied to the second doucment (which is good) but the first
document becomes the active document and has focus. I now need to click the
second document to bring it to the front before I can continue editing it.

I've put a screen moving showing this behaviour at:
http://baker-evans.com/emarking-assistant/movies/2documents/

I would like the second doucment to stay active. How can I force the second
document to stay active?

Thanks in advance for any assistance,
Peter Evans
 

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