saywell 3 Posted August 3, 2010 Hi, I've got some code that opens a Word doc from a template, does a 'save as' to set the filename then does various search/replaces and sets the metadata, and saves again. The focus should then go back to the word doc for the script to enter some text from a string, and a couple of 'returns' etc. This works fine on most of the PCs I've tried it on [all XP] but I've found 2 that don't, and I think it's a problem with those particular PCs [both of the same old age and low spec]. Does anyone know which dll is used in switching focus, so I can try swapping it with one from a machine on which my script works? I'v checked the ForegroundLockTimeout settings in HKEY_CURRENT_USER\Control Panel\Desktop and it's set to zero on all the machines, so that's not the cause. Any thoughts/ideas/suggestion as to other possibilities welcomed!! Thanks, William Share this post Link to post Share on other sites