View Single Post
 
Old 08-27-2022, 10:26 AM
coffent coffent is offline Windows 10 Office 2019
Advanced Beginner
 
Join Date: Dec 2019
Posts: 40
coffent is on a distinguished road
Default Newly-created document does not get focus

When I enter the following keystrokes in Word:
<alt>F..............File menu
N.................... New document
M2.................. Word's reference number for a template I created
it brings up a new document based on the "M2" template, exactly as desired. Up until today, that document had the focus. If I started typing, the keystrokes would be entered into the new document. As of today, however, the newly-created document usually does not have the focus. Typing is not entered into the new document (nor any other place), even though there is a blinking cursor in the document. Clicking on the new document brings the focus to it, and from then on everything is fine. Occasionally the new document has the focus without clicking on it, but most of the time not.

The problem is I've written a macro to simulate the keystrokes. The macro creates the new document correctly, but when it goes to paste text into it, nothing happens because the new document doesn't have focus.

Is there some Windows or Word parameter that I could have changed inadvertently that would cause this lack of focus? Why would it work for years, then suddenly (most, but not all of the time) change behavior? Thanks for any ideas!
Reply With Quote