Hello, On MS-Word (2003),
1. I'm building a macro that uses a User Form to interact with the user (several times), asking the user to select text (or a line) and then return to the Form and hit OK. This goes back & forth between the Form and the Doc several times.
2. Everytime the user returns back to the Doc to select the next batch of text or line, he/she has to click on the Doc window 1-time to give it the FOCUS, then click again to make the text or line selection.
3. Sometimes this is confusing. They may click only 1-time and think they made a line selection, but they really didn't (they only made the initial FOCUS change, and didn't really make the intended range selection).
4. Question: Within the VBA code, is it possible to automatically move the FOCUS from the User Form to the Doc Window for the user? So, when the user clicks on the Doc the 1st time, he/she is selecting text (line) on the 1st mouse selection.
I can't find any way to move FOCUS from a User Form (that was just shown) back to the Document (and away from the User Form). Do you have any ideas on how to do this???
Figured My Own Solution: Use following SendKeys code (see below). This sends focus back to the main Word Window. Found this key combination in the exhaustive list of HotKey Tips from MS Help. Tested and works even if other Word docs are open or if other application programs are running at the same time.
Bookmarks